GTM-Universal
Creating a Google Analytics (UA) Account
Go to Google Analytics
Figure 1
Sign in with your Google account.
Figure 2
Click on Start Measuring.
Figure 3
Enter an account name. Use a descriptive name, so you can easily tell what this account is for when you see it in the list of accounts.
Figure 4
Enter the property name and click on Show advanced options. Use the name of your website or app, so you can easily identify what this property is used for.
Enable the toggle button to create a Universal Analytics property and enter your website URL for which this property will be used.
Figure 6
Click on Create a Universal Analytics property only because the other option (GA4) is still in the beta stage.
Fill in all other business details and click on Create.
Figure 7
Read and accept the terms of service.
Figure 8
You have successfully created your Google Analytics account. Note down your property's tracking ID as shown below. This tracking ID will be used while creating a GTM tag.
Figure 9
Creating a GTM Account
Click on All Web Site Data as shown in fig. 9. Go to Tag Manager (2nd icon) and click on Get started.
Figure 10
Click on Create Account.
Figure 11
Enter a descriptive account name and select your country.
Figure 12
Enter a container name and target platform. In this example, we will analyze user behaviour on desktop and mobile web. Therefore, let's select Web as the target platform.
Figure 13
Read the Terms of Service and click Yes (if you agree to those terms).
Figure 14
You have successfully created your GTM account. Note down your Container ID as shown below. This container ID will be used to integrate GTM with the Fynd Platform.
Figure 15
Integrating GTM with Fynd Platform
On Fynd Platform, go to the Settings screen of your sales channel and click on Integration.
Figure 16
Click on GTM.
Figure 17
In the API Key, paste the container ID (copied from step 1). Enable this integration using the toggle button and click Save.
Figure 18
It may take up to 5 minutes for your GTM code (container ID) to reflect in your page source.
Go to your website, then right-click and select View Page Source.
Figure 19
Use Ctrl+F and type gtm. If you can view the container ID in your page source, your GTM integration is successful.
Figure 20
Creating a GTM tag
Once the GTM code is integrated with Fynd Platform, you can start creating GTM tags.
From the left-panel, go to Tags and click New.
Figure 21
Enter a descriptive tag name. We have used Count View-All Tag to indicate that this tag will be used to count the number of times, users have clicked the View All link on the website.
Figure 22
Choose Google Analytics: Universal Analytics.
Figure 23
Enter Event as your Track Type. Choose pre-defined options or write your own Category, Action and Label.
Figure 24
The event category and event label entered by you will be shown as-it-is on Google Analytics page.
From the Google Analytics Settings drop-down, select New variable...
Figure 25
Enter the Tracking ID of your Google Analytics account.
Figure 26
You have seen in Creating a Google Analytics Account section, how to obtain the Tracking ID (refer to the image below).
Once you have created a tag, it's time to create a trigger. A trigger is nothing but an event which will fire the GTM tag (in this example, we will count the number of times users click the VIEW ALL link). The event can be any activity that a user performs on the website.
Figure 29
Choose a trigger type. In this example, let's choose Click-All Elements Trigger.
Figure 30
Select Some Clicks because you don't want to trigger (fire) your tag on every click made by the user.
Figure 31
Select Choose Built-In Variable from the drop-down.
Figure 32
Let's choose Click Text.
Figure 33
In this example, the website contains a VIEW ALL link on its home page. Let's enter VIEW ALL in the field so that whenever a user clicks on that link, the tag gets triggered.
Figure 34
Enter the trigger name and save it.
Figure 35
Click on Submit near the top of the window.
Figure 36
Write a version name and description of this trigger. Click on Publish.
Figure 37
Each time you publish your tag, you'll have to enter the version name and description.
Previewing your GTM tag
GTM allows you to test your tag. Click on Preview near the top of the window.
Figure 38
Enter the URL of your website that is tagged with GTM.
Figure 39
Wait for the Tag Assistant to connect to your website.
Figure 40
Your website will be open in a new tab along with a debugger.
Figure 41
In the previous tab (Tag Assistant), you can cross-check whether the debugger (preview) mode is successfully connected.
Figure 42
Since we have created a VIEW ALL trigger, let's click the VIEW ALL link on the website's homepage.
Figure 43
In the previous tab, under Tags Fired section, you can see that the Count View-All Tag is triggered.
Figure 44
Your tag is functioning successfully. Now you may stop the debugger.
Figure 45
Using Google Analytics to view GTM output
In the left-panel of your Google Analytics page, go to Realtime --> Events. Here, you can view the real-time data of users on your website, which includes the number of times, the VIEW ALL link was clicked on the website.
Figure 46
The Event Category and Event Action were entered in step 4 while creating a GTM tag
You can also view the graphical and numerical representation of mobile and web users. The Events graph shows the number of times your GTM tag got triggered.
Figure 47