AFL UTM Tracker Documentation

  1. Home
  2. Docs
  3. AFL UTM Tracker Documentation
  4. Contact Form 7 Integration
  5. Pre-populate Contact Form 7 Hidden Fields

Pre-populate Contact Form 7 Hidden Fields

With our AFL UTM Tracker plugin, you can also pre-populate Contact Form 7 form fields with UTM tracking data by following the tutorial below.

Please note that you don’t need to do this unless you are sending the data to another third-party plugin or service.

Setup

  1. Go to your Contact Form 7 > Select Form.
  2. Add a hidden field using the formula below.

Hidden Field Formula

[hidden field_name field_formula]

Example

A hidden field to store the “First Landing Page”.

[hidden sess_landing afl_wc_utm:sess_landing]

A hidden field to store the “First UTM Source”.

[hidden first_utm_source afl_wc_utm:utm_source_1st]

List of Field Formula

Copy and paste only the parameter names which you are interested into your Hidden Field. Give an appropriate text label for each of the Hidden Field.

Take note that you can access two types of URL values:

  • a full URL with all query parameters
  • a clean URL without any query parameters.

== SESSION ==

Conversion Type:
afl_wc_utm:conversion_type

Conversion Lag:
afl_wc_utm:conversion_lag_human

Conversion Lag (seconds):
afl_wc_utm:conversion_lag

Conversion Date:
afl_wc_utm:conversion_date_local
afl_wc_utm:conversion_date_utc
afl_wc_utm:conversion_ts

Visit Date:
afl_wc_utm:sess_visit_date_local
afl_wc_utm:sess_visit_date_utc
afl_wc_utm:sess_visit

Landing Page URL:
afl_wc_utm:sess_landing
afl_wc_utm:sess_landing_clean

Website Referer URL:
afl_wc_utm:sess_referer
afl_wc_utm:sess_referer_clean

Google Analytics Client ID:
afl_wc_utm:sess_ga

Cookie Consent:
afl_wc_utm:cookie_consent

== UTM CAMPAIGN (FIRST TOUCH) ==

UTM URL:
afl_wc_utm:utm_1st_url
afl_wc_utm:utm_1st_url_clean

Visit Date:
afl_wc_utm:utm_1st_visit_date_local
afl_wc_utm:utm_1st_visit_date_utc
afl_wc_utm:utm_1st_visit

UTM Source:
afl_wc_utm:utm_source_1st

UTM Medium:
afl_wc_utm:utm_medium_1st

UTM Campaign:
afl_wc_utm:utm_campaign_1st

UTM Term:
afl_wc_utm:utm_term_1st

UTM Content:
afl_wc_utm:utm_content_1st

== UTM CAMPAIGN (LAST TOUCH) ==

UTM URL:
afl_wc_utm:utm_url
afl_wc_utm:utm_url_clean

Visit Date:
afl_wc_utm:utm_visit_date_local
afl_wc_utm:utm_visit_date_utc
afl_wc_utm:utm_visit

UTM Source:
afl_wc_utm:utm_source

UTM Medium:
afl_wc_utm:utm_medium

UTM Campaign:
afl_wc_utm:utm_campaign

UTM Term:
afl_wc_utm:utm_term

UTM Content:
afl_wc_utm:utm_content

== Google Click Identifier (gclid) ==

URL:
afl_wc_utm:gclid_url
afl_wc_utm:gclid_url_clean

Visit Date:
afl_wc_utm:gclid_visit_date_local
afl_wc_utm:gclid_visit_date_utc
afl_wc_utm:gclid_visit

gclid Value:
afl_wc_utm:gclid_value

== Facebook Click Identifier (fbclid) ==

URL:
afl_wc_utm:fbclid_url
afl_wc_utm:fbclid_url_clean

Visit Date:
afl_wc_utm:fbclid_visit_date_local
afl_wc_utm:fbclid_visit_date_utc
afl_wc_utm:fbclid_visit

fbclid Value:
afl_wc_utm:fbclid_value

== Microsoft / Bing Click Identifier (msclkid) ==

URL:
afl_wc_utm:msclkid_url
afl_wc_utm:msclkid_url_clean

Visit Date:
afl_wc_utm:msclkid_visit_date_local
afl_wc_utm:msclkid_visit_date_utc
afl_wc_utm:msclkid_visit

msclkid Value:
afl_wc_utm:msclkid_value