In order for Google Tag Manager to work with ThirstyAffiliates Pro Google click tracking module, you will need to set up the tag specifically for it.
- Google tag manager workspace for your website.
- Settings variable for Google Analytics.
Step 1. Create the Link URI Variable
- Login to Google Tag Manager and access your website’s workspace
- Go to the Variables page (left menu), scroll down to the user-defined variables section and click “NEW” button
- Name the variable (e.g. Link URI Variable)
- Click anywhere in the variable configuration box, and select Data Layer Variable option
- Important: Set Data Layer Variable Name field to link_uri
- Save the variable
Step 2. Create the Trigger
- Go to the Triggers page (left menu) and click “New” button.
- Name the trigger (e.g. ThirstyAffiliates Event Trigger)
- Click anywhere on the trigger configuration box, and select Custom Event option.
- Important: set the event name field the same value as the Custom Event category name click tracking setting on your website. (default value is “Affiliate Link”)
- Set this trigger fires on radio field to All custom events.
- Save the trigger
Step 3. Create the Tag
- Go to the Tags page (left menu) and click “New” button.
- Name the tag (e.g. ThirstyAffiliates click tracking tag)
- Click anywhere in the tag configuration box and select Universal Analytics or Classic Google Analytics, depending on what you are using.
- Set Track Type to “Event”.
- On the category field, click the add icon and select the custom event variable.
- For the action field, select the Link URI variable that we created in step 1.
- For the Label field, select the Page Path variable.
- Leave the value field blank, or set it to another variable that you prefer.
- For Google analytics settings field, select the google analytics settings variable for your website.
- Next, click anywhere on the triggering box.
- Select the custom trigger that we’ve created in step 2.
- Save the Tag
For the new settings to work, you will need to click Submit in the top right corner of your workspace.