# Widget Events in Google Analytics

## How To Setup Widget Analytics Using GA4 & GTM

In order to setup widget analytics using Google Analytics and Google Tag Manager you will need to follow the instructions in the following help articles:

{% content-ref url="widget-events-in-google-analytics/1.-google-analytics-and-google-tag-manager" %}
[1.-google-analytics-and-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)
{% endcontent-ref %}

{% content-ref url="widget-events-in-google-analytics/2.-ga4-custom-events-and-definitions" %}
[2.-ga4-custom-events-and-definitions](https://docs.chathq.io/api-and-developer-docs/custom-tracking-and-analytics/widget-events-in-google-analytics/2.-ga4-custom-events-and-definitions)
{% endcontent-ref %}

{% content-ref url="widget-events-in-google-analytics/3.-tags-and-triggers-in-google-tag-manager" %}
[3.-tags-and-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)
{% endcontent-ref %}

{% content-ref url="widget-events-in-google-analytics/4.-using-the-data-layer-to-define-custom-variables" %}
[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)
{% endcontent-ref %}

{% content-ref url="widget-events-in-google-analytics/6.-testing-widget-analytics" %}
[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)
{% endcontent-ref %}
