Dynamically Populating UTM Parameters in Gravity Forms Hidden Fields

WooCommerce UTM Tracker Tutorial

With version 1.2.5 of our WooCommerce UTM Tracker plugin, you’ll be able to dynamically populate the UTM parameters in your Gravity Form Fields.

This is only required if you plan to push the UTM parameters to third-party API service like Zapier, Active Campaign or Mailchimp.

Otherwise you do not need to create these extra fields since we collect the UTM parameters automatically for each submitted entries and display them in a metabox.

How to dynamically populate UTM parameters?

This is an example for creating a UTM Source field.

  1. Start by adding a Hidden Field to your Gravity Form.
  2. Set the Field label to UTM Source.
  3. In the “Advanced” tab, check the “Allow field to be populated dynamically”.
  4. Underneath it, set the Parameter Name as afl_wc_utm:utm_source.
  5. Repeat by creating Hidden Fields for other UTM parameters.
Gravity Forms Hidden Field

List of available parameter names

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.

== FIRST SESSION ==

Visit Date:
afl_wc_utm:sess_visit

Landing Page:
afl_wc_utm:sess_landing

Website Referer:
afl_wc_utm:sess_referer

Google Analytics Client ID:
afl_wc_utm:sess_ga

== UTM CAMPAIGN (FIRST TOUCH) ==

UTM URL:
afl_wc_utm:utm_1st_url

Visit Date:
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

Visit Date:
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 (gclid) ==

URL:
afl_wc_utm:gclid_url

Visit Date:
afl_wc_utm:gclid_visit

== FACEBOOK (fbclid) ==

URL:
afl_wc_utm:fbclid_url

Visit Date:
afl_wc_utm:fbclid_visit

Warning: Do not send a Gravity Forms Notification to your leads with the {all_fields} merge tags because hidden field are also included.

Comments