---
description: This feature is available for "Middle" and higher plans.
---

# Google Analytics

Ant Quiz Kit app allows you to add your own Google Analytics events to track different actions.

Make sure you've already enabled Google Analytics 4 for you store. The detailed manual on this topic can be found [here.](https://help.shopify.com/en/manual/reports-and-analytics/google-analytics/google-analytics-setup)

## How to connect?

Navigate to the Integrations page in the top navigator:

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2Fe00wiJKDc5sKxpaXKsnc%2Fnav-integrations.jpg?alt=media&#x26;token=544f884e-9661-4b0c-9da9-db5cf14f29ac" alt=""><figcaption></figcaption></figure>

Go to Analytics & Tracking tab -> Google Analytics section and click "Enable":

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2FdSoeWmVRJB4CUpqxl12f%2Fgoogle-analytics-enable.jpg?alt=media&#x26;token=103e88b3-b2b2-49ca-b640-f4fc43329742" alt=""><figcaption></figcaption></figure>

Navigate to the quiz "Settings" screen and select "Tracking" tab:

You can also enable and disable Google Analytics integration here:

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2F5eTyvlQHxgMnKO80RFYD%2Fga-events.jpg?alt=media&#x26;token=dfe99827-e1f8-41ff-bc24-07085b0bc10f" alt=""><figcaption></figcaption></figure>

## Create custom events

At this step, you have to create custom events in GA.

You can use any event name for tracking the following events: quiz started, customer subscribing, question answered, and quiz completed. Type your event name into the relevant fields and don't forget to save your changes:

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2FwilXRCiO7pauyM3ZcfNY%2Fga-custom-events.jpg?alt=media&#x26;token=30ec4a79-af63-4a62-84b9-244169d39a0d" alt=""><figcaption></figcaption></figure>

## How to add custom tags to GTM

Go to the Google Tag Manager from the Google Analytics dashboard:

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2FbbffWsPzZfUYMD8TPtZR%2Fga-gtm-dashboard.png?alt=media&#x26;token=fdea61ab-ffc8-4fc6-9561-ded4789de3d5" alt=""><figcaption></figcaption></figure>

Let's create custom tag.

Navigate to Tags screen in the GTM dashboard and create "New":

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2Fe1g2RpZf2k7cYZS9KCbn%2Fga-gtm-create-tag.png?alt=media&#x26;token=0d6d92f8-3b87-4a70-a66e-5fdcfffa8406" alt=""><figcaption></figcaption></figure>

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2Fw2kDJC7hrok9uxhZBFzz%2Fga-intro-gtm-tag.jpg?alt=media&#x26;token=fde1fb8c-3e17-49e0-b282-f4578b4a12e4" alt=""><figcaption></figcaption></figure>

Use the event name from Ant Quiz Kit dashboard for creating trigger as well. Trigger type should be "Custom event":

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2FBg7lBIdyY2KOV6Yd6nwB%2Fga-start-trigger.png?alt=media&#x26;token=30de60fd-ae16-48be-b4c9-e77b30807b3a" alt=""><figcaption></figcaption></figure>

In the other words - use event name you've set in the Quiz settings everywhere for the event name during Tag creation.

Save your tag and submit it.

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2Fs6kRLqGOMEsE6TbytxCH%2Fga-save-tag-submit.png?alt=media&#x26;token=722b9000-89e7-46a7-bebf-888c9fe98aae" alt=""><figcaption></figcaption></figure>

You are done! At this point, all events will now be tracked by Google Analytics:

<figure><img src="https://801999161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBj7Dcuw4A2SgC5bCZ2MG%2Fuploads%2FsT0OGhv7iJXZiTRGB7Rg%2Fga-all-donw.png?alt=media&#x26;token=25b737f8-3e5f-47da-b0f8-582d361a856c" alt=""><figcaption></figcaption></figure>
