Sending UTM Values to Keap Order Forms

In addition to tracking UTM values internally, SegMetrics' tracking pixel allows you to send the optin UTM value into your Keap contacts.

What many people DON'T know is that you can do this on order forms in addition to your regular forms, with a little bit of tweaking.

There are 4 easy steps to begin saving your tracked UTM values in your Keap Order Forms.

1. Set Up Your Custom Fields

To start out, you'll need to create custom fields for the following values that will be saved in your Keap contact. You can find information on how to create the custom fields from Keap's knowledgebase, here:  https://classic-infusionsoft.knowledgeowl.com/help/create-custom-fields

Create the following Custom Fields:

  • utm_source
  • utm_content
  • utm_medium
  • utm_campaign
  • utm_term
  • referrer
  • optin_url

2. Set Your Custom Field Mapping in SegMetrics

Navigate to the  Integrations screen in your Account Settings, and choose Configure Custom Fields from the Manage Settings button.

During the account integration process we will have imported the names of all of your Keap fields. Select the Custom Fields from the dropdown menus that match the custom fields you created in step 1.

3. Configure the Tracking Pixel

Next, you'll need to configure the tracking pixel.

Turn the toggle on for "Populate Custom fields on your existing Keap forms." This will set the custom fields you defined (above) on all your forms that are configured to receive them.

Then click Save Pixel Settings. You'll want to leave this window open so you can copy the tracking pixel in step 5.


4. Add the Fields to your Order Form

In order to have Keap recognize the Custom Fields in your order form, you'll need to add the fields as   Hidden fields to the forms you want to track.

Keap doesn't give you an easy way to do this, so you'll have to add it to the HTML Areas of your Order Form.

  1. In Keap, from the main nav menu go to E-Commerce Setup
  2. Click on Order Forms
  3. Click on the Order Form you would like to edit
  4. Click the HTML Areas tab
  5. Input the following code into the Custom Header Section, and click Save:
<div id="seg-custom">
    <input name="Contact0_utmcampaign" type="hidden" />
    <input name="Contact0_utmmedium" type="hidden" />
    <input name="Contact0_utmsource" type="hidden" />
    <input name="Contact0_utmcontent" type="hidden" />
    <input name="Contact0_utmterm" type="hidden" />
    <input name="Contact0_referrer" type="hidden" />
    <input name="Contact0_optinurl" type="hidden" />
</div>

NOTE: Make sure that the field names are the same as the Database Names in Keap. (You can look at the names in the Tracking Pixel if you're not sure)


5. Add the Tracking Pixel to your Order Form

Finally, you'll need to update the Tracking Pixel to work with the the Order Form.

Your standard pixel should look something like this:

<!-- SegMetrics -->
<script type="text/javascript">
var _segq = _segq || [];
var _segs = _segs || {};
_segs.integration = '0000';
_segs.form_fill = {
    utm_content:  'inf_custom_utmcontent',
    utm_campaign: 'inf_custom_utmcampaign',
    utm_medium:   'inf_custom_utmmedium',
    utm_term:     'inf_custom_utmterm',
    utm_source:   'inf_custom_utmsource',
    referrer:     'inf_custom_referrer',
    optin_url:    'inf_custom_optinurl'
};
(function(){var dc=document.createElement('script');dc.type='text/javascript';dc.async=true;dc.src='//tag.segmetrics.io/seg.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(dc,s);})();
</script>
  1. Paste the tracking code into the Custom Footer Section
  2. Replace all the text that says inf_custom with Contact0 (a zero, not an O)
  3. The form_fill section should look like this:
_segs.form_fill = {
    utm_content:  'Contact0_utmcontent',
    utm_campaign: 'Contact0_utmcampaign',
    utm_medium:   'Contact0_utmmedium',
    utm_term:     'Contact0_utmterm',
    utm_source:   'Contact0_utmsource',
    referrer:     'Contact0_referrer',
    optin_url:    'Contact0_optinurl'
};
  1. Click Save All

Now you'll be able to track the UTM values of any visitors who go to your order forms with UTM values in the URL.

Still need help? Contact Us Contact Us