Set up Gravity Forms for Marketing Attribution and UTM Tracking


Add marketing attribution to your Gravity Forms entries so each lead can arrive with its original channel, campaign details, and landing page.
This guide walks through installing Madlitics on WordPress, configuring hidden fields in a new or existing Gravity Form, and receiving attribution in entries and sending it to your CRM.
For an explanation of first-touch attribution and reporting, see our Gravity Forms marketing attribution guide.
Before you begin: Make sure Madlitics is installed across your WordPress website, including the pages visitors land on and the pages containing your forms. Follow the WordPress installation guide if you haven’t added the script yet.
Already using Gravity Forms? Skip this step and open the form you want to configure.
Step 1: Gravity Forms is a commercial WordPress form builder plugin that you must purchase from the Gravity Forms website ↗. After buying a license, you download the plugin as a ZIP file and manually upload it to your WordPress site. Select 'Plugins' from the sidebar menu and either click the 'Add Plugin' button from the page or select the 'Add plugin' dropdown menu item. Click the 'Upload Plugin' button, choose the Gravity Forms download zip, and click 'Install Now'.
Once installed the plugin must be activated by clicking the 'Activate' button. Once activated, you'll be redirected to the Plugins page, to register your Gravity Forms license key.
Plugins > Add Plugin > Upload plugin > Activate



Step 2: In your WordPress dashboard, go to Forms and select Edit beneath the form you want to configure.
To create a new form, select Add New, choose a template, and complete the form details. Add the contact fields your visitors will fill out, then configure the attribution fields below.



Step 3: Add seven hidden fields to receive Madlitics attribution data. Visitors won’t need to complete these fields; Madlitics populates them automatically.
channel.[channel], including the square brackets.The field label and default value are separate settings. For example, use channel as the label and [channel] as the default value.




Marketing Channel
Classifies the original visit into a marketing channel, such as Paid Search, Organic Social, or Referral.
Field label: channel
Default value: [channel]
Segment 1
Records utm_source for tagged campaign visits. For other traffic, its value depends on the classified source.
Field label: segment1
Default value: [segment1]
Segment 2
Records utm_campaign for tagged campaign visits.
Field label: segment2
Default value: [segment2]
Segment 3
Records utm_term. This contains whichever detail you assign to that parameter, such as an ad group or keyword.
Field label: segment3
Default value: [segment3]
Segment 4
Records utm_content. Use it to distinguish creatives, ads, or link variations.
Field label: segment4
Default value: [segment4]
Landing Page
Records the visitor’s original entry page, which may differ from the form submission page.
Field label: lp
Default value: [lp]
Landing Page Group
Records the group or category associated with the original landing page.
Field label: lpg
Default value: [lpg]
Campaign segment values depend on the incoming tags and traffic source. Untagged or Direct visits won’t necessarily populate every segment.
These seven fields cover the default attribution setup. Click IDs and other additional values require their corresponding fields. See UTM tracking in Gravity Forms for campaign tagging guidance.
If your form is already embedded, save your field changes and test it on the published page. For a new form, follow the steps below to add it to a WordPress page.
Step 4: Select the page (or post) you want to begin capturing marketing data on, with the newly created form. In the page editor, select 'Add Block', search for Gravity Forms and click the Gravity Forms block component. Select the name of the form, that includes the hidden fields, from the Select Form dropdown to embed it on the page.
Repeat the field configuration for each form you want to enrich. You can embed the same configured form on multiple pages.
Add block > Search 'Gravity Forms' > Select Gravity Forms > Select form



Once your form is saved and published, Madlitics populates the configured hidden fields when a visitor submits. Their original marketing channel, campaign segments, and landing page appear alongside their contact details in Forms → Entries.
That attribution stays connected to the submission even when the visitor first arrives on another page and navigates before completing the form. Available campaign details depend on the incoming tags and traffic source.
Submit a test inquiry on your published website and open the saved entry to confirm that the expected attribution is present.

Use your Gravity Forms integration, webhook, or automation workflow to send the captured attribution alongside each lead’s contact details.
Map the Madlitics fields to the corresponding properties in your CRM, including channel, source, campaign segments, and original landing page. Once configured, new submissions can carry that marketing context into your existing sales and reporting workflows.
As leads become opportunities and customers, use their original attribution to compare lead quality, pipeline, and revenue by channel or campaign.
Follow our guide to sending attribution data to your CRM for field mapping guidance.
With Madlitics now activated and your forms ready to accept marketing attribution data, you can start tracking valuable insights immediately, and pass attribution data into your CRM, email marketing platform, business intelligence tool or more for advanced reporting.
Answers to common questions about setting up tracking with Madlitics and Gravity Forms