AFL UTM Tracker Documentation

  1. Home
  2. Docs
  3. AFL UTM Tracker Documentation
  4. Cookie Consent Banner Integration
  5. Manual / Custom Integration

Manual / Custom Integration

Since AFL UTM Tracker version 2.14.7, we have prepared two Javascript functions where you can use them in your code to opt-in or opt-out of cookies.

Please reach out to us by email if you need help with a specific Cookie Consent Banner.

Plugin Setting

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

NOTE: Setting the Consent Category does not affect anything since you will be using manually calling the javascript function to opt-in or opt-out of cookies.

Javascript Functions

The following javascript file be loaded on the frontend. It is best to wait till the script has loaded before using the functions below.

/wp-content/plugins/afl-wc-utm/public/js/manual.min.js

The functions below can be used in your cookie consent banner plugins. There are usually callback function for opt-in and opt-out where you can insert the functions below.

Please check the documentation of your cookie consent banner plugin.

Opt-in

afl_wc_utm_optin();

Opt-out

afl_wc_utm_optout();