AFL UTM Tracker Documentation

  1. Home
  2. Docs
  3. AFL UTM Tracker Documentation
  4. Cookie Consent Banner Integration
  5. Google Consent Mode Integration

Google Consent Mode Integration

You can integrate our AFL UTM Tracker plugin with your Consent Management Platform (CMP) through the Google Consent Mode.

The AFL UTM Tracker plugin will “opt-in” or “opt-out” of cookies based on the consent update event from Google Consent Mode.

The steps below involves using our Google Tag Manager template. It supports 2 types of consent category:

  • analytics_storage for Statistics
  • ad_storage for Marketing

Minimum Requirements:

  • AFL UTM Tracker v2.14.7
  • Google Tag Manager
  • Consent Management Platform (CMP) that supports Google Consent Mode

Steps

WordPress Admin

  1. Login to your WordPress dashboard.
  2. Under the AFL UTM Tracker menu > Settings.
  3. Look for the Cookie Consent Integration section.
  4. Select ‘GTM / Manual‘ from the drop-down list.
  5. Save setting.
  6. Clear all page cache.

NOTE: Changing the Consent Category in our plugin setting does not affect the Consent Category in your our Google Tag Manager (GTM) template. The Require Consent field set in our GTM tag will be the main source.

Importing the GTM template

  1. Download our Google Tag Manager template.
  2. Login your Google Tag Manager dashboard.
  3. Go to your website’s container.
  4. Under Templates > New.
  5. Click the burger menu > Import.
  6. Select “AFL UTM Tracker – Google Consent Mode.tpl” file.
  7. Save.
GTM Templates > New
GTM Templates > New
GTM Template > Import
GTM Template > Import
GTM Template > AFL UTM Tracker - Google Consent Mode
GTM Template > AFL UTM Tracker – Google Consent Mode

Adding Tag

  1. Under Tags > New.
  2. Name the tag ‘AFL UTM Tracker – Google Consent Mode’.
  3. Tag Configuration > Choose tag type > Custom > AFL UTM Tracker – Google Consent Mode.
  4. Set Required Consent field.
    • Select ‘analytics_storage’ if you are collecting the user’s UTM report for statistics purposes.
    • Select ‘ad_storage’ if you are collecting the user’s UTM report for marketing purposes.
  5. Leave the Triggering section empty for the moment.
  6. Save.
GTM > Tags > New > Choose Tag Type
GTM > Tags > New > Choose Tag Type
GTM > Tag > AFL UTM Tracker > Set Required Consent
GTM > Tag > AFL UTM Tracker > Set Required Consent

Setup Triggering

Depending on the Required Consent value above, make sure that you have the appropriate Consent Category already setup in your Consent Management Platform tag.

For example, if you have selected ‘analytics_storage’ above:

  • Check if your CMP already has a Consent Category for Statistics / analytics_storage.
  • Check if your CMP needs to register a list of our plugin cookies. If yes, enter the following into the field:
afl_wc_utm*
  1. Under Tags > Select your Consent Management Platform (CMP) tag (etc Complianz / Civic UK).
  2. Under Tag Configuration > Advanced Settings.
  3. Under Tag Sequencing:
    • Select “Fire a tag before …”.
    • Setup Tag > Select ‘AFL UTM Tracker – Google Consent Mode‘ tag.
  4. Save.
Tag > CMP > Tag Sequencing
Tag > CMP > Tag Sequencing

Testing the Tag

  1. Next Preview your workspace.
  2. Launch your website through the debugger.
  3. Right click > Inspect Element or open your browser developer tool.
  4. Go to the Application tab > Cookies > Select your website URL.

Test Opt-in

  1. Click on your Cookie Consent Banner to allow consent for Statistics purposes.
  2. Under the Cookies list, watch as our cookies with the prefix ‘afl_wc_utm_’ being generated.

Test Opt-out

  • Click on your Cookie Consent Banner to reject consent for Statistics purposes.
  • Under the Cookies list, watch as our cookies are deleted. You might need to right click on the list to Refresh.

If everything works, go ahead and publish your workspace changes.

Do drop us an email with your website link for us to audit.