Setting up Analytics with Google Tag Manager
Last updated
Was this helpful?
Last updated
Was this helpful?
This article covers how to set up Google Tag Manager to collect and organize data on how users interact with your Airkit apps.
Access to a .
Passing familiarity with how to set up tags and triggers within Tag Manager. (To learn more about tags, triggers, and collecting data within Tag Manager, check out .)
Setting up Tags Manager so that it can begin handling the analytics of your website begins by installing the Tags Manager and declaring what container your data will be associated with. (Outside of Airkit, this is often done by inserting code into the relevant web pages, see documentation .) This is done via the following steps:
Open the app that you want to associate with Tag Manager in the .
Toggle down to the and scroll down to the Analytics section.
Under Provider, select "Google Tag Manager".
Under ID, enter your Tag Manager container ID, which should be in the format GTM-XXXXXX
. (The container ID defines the container within Tag Manager that will store analytics related to this app. The containers accessible to you as well as their associated IDs should be visible upon visiting ; their also describes how to find and utilize your container IDs.)
Upon completion, the Analytics section of the Configuration Builder should look as follows, with the "X"s under ID replaced with the value of your own Tag Manger container ID:
Save your changes. Installation of Tag Manager is now complete and includes the creation and installation of the optional object.
Once Tag Manager is installed and the application is published, Airkit will automatically send a custom page tracking event to the every time a user navigates to another or Web Page. This custom page tracking event is sent in a JSON object with the following format, where Web_Flow and Web_Page correspond to the names of the Web Flow and Web Page (respectively) that the user just navigated to:
While this custom page tracking event will automatically be sent to the data layer, a tag and custom event trigger must be set up so that the sent information can be properly parsed. To read more about triggers and custom events within Tag Manager, click .
In addition to automatically sending a custom page tracking event to the data layer every time a user navigates to another Web Page, Airkit also provides the tools to send a custom payload at any time, using the , which will send a JSON object in the following format:
Event_Name and Event_Properties correspond to values entered in the under "Event Name" and "Event Properties", respectively.
As with logging page views, a a tag and custom event trigger must be set up so that the sent information can be properly parsed. To read more about triggers and custom events within Tag Manager, click .