AFL UTM Tracker Documentation

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

Civic Cookie Control Integration

This guide outlines the steps to integrate our AFL UTM Tracker plugin with the Civic Cookie Control.

Which method are you using to load the Civic Cookie Control banner on your website? Each method employs a different setup process.

  1. WordPress Plugin – Civic Cookie Control
  2. Google Tag Manager – Civic Cookie Control Template

Before we begin, lets assume that you need the Statistics or Analytics consent from your website visitor before the AFL UTM Tracker plugin can store cookies.

Minimum Requirements:

  • AFL UTM Tracker v2.14.7

Method A: Civic Cookie Control WordPress Plugin

Before we start, we assume that you are using the official Civic Cookie Control WordPress plugin and you have the basic already configured.

AFL UTM Tracker Setup

  1. Login to your WordPress dashboard.
  2. Go to AFL UTM Tracker > Settings.
  3. Look for the Cookie Consent Integration section.
  4. Set the Cookie Consent Integration: “GTM / Manual”.
  5. Set the Consent Category: Statistics.
  6. Save setting.
  7. Clear all page cache (important).

Civic Cookie Control Setup

  1. In the WordPress dashboard, go to the Cookie Control menu.
  2. Additional Settings > Cookies > Cookie Categories.
  3. If you do not have a Statistics category, click on the “Create New Category” button.
  4. Cookie Name: statistics
  5. Cookie Label: Statistics Cookie
  6. In the Cookies field:
afl_wc_utm*
  1. On accept callback function:
afl_wc_utm_optin();
  1. On revoke callback function:
afl_wc_utm_optout();
  1. Configure the other settings according to the consent law in your country.
Cookie Control > Statistics Category
Cookie Control > Statistics Category
Cookie Control > Callback functions
Cookie Control > Callback functions

Method B: Google Tag Manager – Civic Cookie Control template

This method assumes that you are already imported the Google Tag Manager template from Civic. The template is downloadable from Civic’s GA4 & GTM Template documentation page.

AFL UTM Tracker Setup

  1. Login to your WordPress dashboard.
  2. Go to AFL UTM Tracker > Settings.
  3. Look for the Cookie Consent Integration section.
  4. Set the Cookie Consent Integration: “GTM / Manual”.
  5. Set the Consent Category: Statistics.
  6. Save setting.
  7. Clear all page cache (important).

Civic Cookie Control Setup

  1. Login to your Google Tag Manager account.
  2. Go to your website’s container.
  3. Under Templates > Civic Cookie Control Template.
  4. Click on the Code tab.
  5. In the config variable, register our cookie name into the Analytics category like in the screenshot below.
cookies: 'afl_wc_utm*',
  1. Save template.

Google Consent Mode Setup

  1. Follow our Google Consent Mode documentation.
GTM > Civic Cookie Control template
GTM > Civic Cookie Control template