# Custom Tracking & Analytics

- [Widget Events in Google Analytics](https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics/widget-events-in-google-analytics.md)
- [1. Google Analytics & Google Tag Manager](https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics/widget-events-in-google-analytics/1.-google-analytics-and-google-tag-manager.md)
- [2. GA4 Custom Events & Definitions](https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics/widget-events-in-google-analytics/2.-ga4-custom-events-and-definitions.md)
- [3. Tags & Triggers in Google Tag Manager](https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics/widget-events-in-google-analytics/3.-tags-and-triggers-in-google-tag-manager.md)
- [4. Using the Data Layer to Define Custom Variables](https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics/widget-events-in-google-analytics/4.-using-the-data-layer-to-define-custom-variables.md)
- [5. Creating Custom GTM Variables](https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics/widget-events-in-google-analytics/5.-creating-custom-gtm-variables.md)
- [6. Testing Widget Analytics](https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics/widget-events-in-google-analytics/6.-testing-widget-analytics.md)
- [Tracking Events from Facebook Ads](https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics/tracking-events-from-facebook-ads.md)


---

# Agent Instructions: 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:

```
GET https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
