> For the complete documentation index, see [llms.txt](https://greene-lab.gitbook.io/lab-website-template-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://greene-lab.gitbook.io/lab-website-template-docs/advanced/analytics.md).

# Analytics

{% hint style="info" %}
Analytics scripts might not be as useful as you think, as most ad blocker extensions now prevent them from working, potentially limiting your data to only a small subset of your visitors.
{% endhint %}

There are many available analytics services, the most well-known being Google Analytics. They each work slightly differently, but they all should have a way to obtain a snippet of code that you can paste into the pages that you want to track.

The snippet will generally look something like this, a minimal `<script>` tag with an ID unique to you:

```html
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-XXXXXXXX-X');
</script>
```

Once you've found this code snippet for your analytics service, paste it into `/_includes/analytics.html` to include it on every page on your site.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://greene-lab.gitbook.io/lab-website-template-docs/advanced/analytics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
