HandL UTM Grabber / Tracker: Integrations

By Haktan Suren, PhD
In Blog
Apr 10th, 2016

HandL UTM Grabber / Tracker is a unique WordPress plugin for storing, tracking and using UTM variables on any pages, posts and custom posts with ease. Unique shortcodes feature of each individual UTMs allows you to pass the information specifically to your email marketing tools (CRM).

HandL UTM Grabber integrates with ANY email forms and email marketing tool. I will just give some examples on this page about how you can get the most benefit from the plugin by integrating the email marketing tool of your choice. Feel free to comment under this post, if you could not find the tool you work with and want me to publish tutorial about it.

WARNING: Tutorials below assumes you are having the latest version of the plugin. Please download the latest from here before you start.

Contact Form 7

According to feedback I’ve received, CF7 is the most integrated tool with HandL UTM Grabber. Follow this simple step to integrate in seconds.

First we are adding the shortcodes in your form.

[[utm_campaign_i]<input type="hidden" name="utm_campaign" value="%s" />[/utm_campaign_i]]

[[utm_source_i]<input type="hidden" name="utm_source" value="%s" />[/utm_source_i]]

[[utm_medium_i]<input type="hidden" name="utm_medium" value="%s" />[/utm_medium_i]]

[[utm_term_i]<input type="hidden" name="utm_term" value="%s" />[/utm_term_i]]

[[utm_content_i]<input type="hidden" name="utm_content" value="%s" />[/utm_content_i]]

[[gclid_i]<input type="hidden" name="gclid" value="%s" />[/gclid_i]]

Here is what it looks like:
CF7 - UTM Fields in form

And then, to include the new inputs in the email

Campaign Name:

Campaign Source:

Campaign Medium:

Campaign Term:

Campaign Content:


Here is what it looks like:
CF7 - UTM Fields in mail

Gravity Forms


First add your hidden element on your form, give any name for your label. Click “Advanced” tab and check “Allow field to be populated dynamically” and use the shortcode in “Parameter Name”

Here is what it looks like:
Gravity Forms - Add Form Field

WordPress-to-lead for Salesforce CRM


Add your field in sales force plugin and check “Enabled”, select field type as “Hidden” and use the shortcode in “Value”

Here is what it looks like:

Ninja Forms

Add your hidden field into your form. And expand “Advanced Settings” and put “utm_campaign” or other shortcodes (without wrapping it in bracket) in Custom CSS Classes and hit “Save”.

Here is what it looks like:


Active Campaign

Using Embed Code

If you are using embed code directly in your WordPress post, you need to modify the fields accordingly.

Here is an example for you:

<div class="_form_element _field12 _full_width "><input name="field[12]" type="hidden" class="utm_source" /></div>
<div class="_form_element _field13 _full_width "><input name="field[13]" type="hidden" class="utm_medium" /></div>
<div class="_form_element _field14 _full_width "><input name="field[14]" type="hidden" class="utm_campaign" /></div>
<div class="_form_element _field15 _full_width "><input name="field[15]" type="hidden" class="utm_term" /></div>
<div class="_form_element _field16 _full_width "><input name="field[16]" type="hidden" class="utm_content" /></div>

About the Author

Haktan Suren, PhD
- Webguru, Programmer, Web developer, and Father :)

102 Responses to “HandL UTM Grabber / Tracker: Integrations”

  1. […] 2. Submit UTM variables into your favorite email marketing tools (Lead Tracking) Very detailed information and integration tutorials with major marketing tools (ActiveCampaign, Vero, Aweber) and other WP plugins (Contact Form 7, Gravity Forms, WordPress-to-lead for Salesforce CRM, Ninja Forms) can be found here […]

  2. Nancy says:

    I am looking for how to pass the parameters to an ActiveCampaign form. Can you please help?

  3. Matteo says:

    I’m having a problem getting the code to work, I’ve added the code as covered above in contact form 7 but the utm fields are just blank hee is an example of the form along with a utm to test it https://www.attentiontodetailmoving.com/services/free-estimate/?utm_source=Testing&utm_medium=email&utm_campaign=10off&utm_term=relocate please let me know how any suggestions it.

  4. Matteo says:

    Yes, I use W3 total cache just for caching and minify via cloudflare.

  5. Hartmut Schwensen says:

    Can I also add “gclid” or any of the other sources to the salesforce plugin or is limited just to “utm_source”?

  6. Sunder says:

    Hey Mate,

    I am not able to make your plugin work with Active Campaign. I am putting this code that you have mentioned above but when Lead is Registered I am not able to see any extra information apart from Name and Email. Am I missing something?

  7. kính says:

    in Ninja Form

    Custom CSS Classes


    Do you know writer this right or wrong ?

    If Wrong, how to fix ? tks

    • Haktan Suren, PhD Haktan Suren says:

      Hi kinh, I am not sure if I understand your question correctly. If you are using those CSS classes, the fields will be auto-filled with the right UTM parameters. Let me know if this answers your question though.

      • kính says:

        In Ninja Form Custom CSS Classes

        I feel very difficulty when i wrote it

        I write so right (1) or (2)

        1) utm_source,utm_campaign;utm_content

        2) utm_source;utm_campaign;utm_content

        How will you writer the form?

        • Haktan Suren, PhD Haktan Suren says:

          Neither of them correct.
          You should create separate fields for each UTM parameters and then use single class name. For example if you created a field for UTM campaign, class name should be utm_campaign.

  8. Manuel says:

    Hi! I love your work, thank you!

    Can you help me integrate it with Caldera Forms?
    Creating a hidden field with the value [utm_campaign] does not work…

    Thanks so much!

  9. Rob Yorke says:


    I’ve dropped this into my platform and it’s capturing the obvious things like gclid landing page, ip etc but none of the utm information sich as capmain, keyword etc.. Do you know where I can look to open this up into WordPress?


  10. Hung Le says:


    I have error with plugins

    PHP message: PHP Warning: Missing argument 4 for handl_utm_nav_menu_link_attributes() in public_html/home/wp-content/plugins/handl-utm-grabber/handl-utm-grabber.php on line 171

    Can you guide me fix that?

    Thanks you

  11. Nick says:

    I’ve mentioned this on the Slack channel, but a Mautic Form solution would be great please!



  12. Nick says:

    Hi Haktan,

    I have had no response on Slack. Any ideas? I am using this with Thrive Leads

  13. tal says:

    I have the same isue like imedia
    there is any news for new version of ninjaform?

  14. LDL says:

    hello, thanks for the plugin, I was wondering if there’s any way I can take the captured GCLID and create a QR code with it so that I can send the QR code as a response to the filled form. With that the client can come in store and I can easily scan it and import it as a conversion in adwords. Thank you!

  15. AD says:


    i’m using gravity forms on my site and have added hidden fields with the UTM variables in them. When i submit though, the variable details do not show up in my entries. Can you please help here?



  16. Hi,

    Can handl_original_ref and handl_landing_page be captured as well by using the shortcode in Contact Form 7? I tried it and other fields like gclid, utm_source, etc. gets captured but not the landing page and original ref. Thank you.

  17. […] on your Contact Form 7 plugin in WordPress? You are at the right place… If not, please check Handl UTM Grabber Integrations/ page for other plugin (e.g. Gravity Form, Ninja Form and more) […]

  18. Scott says:

    Hi, Thanks for the plugin!

    I have implemented your plugin on this site https://www.alwaysbestcare.com/franchising/ to capture our PPC campaign lead data. The site uses WordPress and ContactForm7.

    The problem is that it’s not pulling the UTM data into the emails.

    Here is what I have in the form…

    [text* fname placeholder “First Name”]
    [text* lname placeholder “Last Name”]
    [email* email placeholder “Email Address”]
    [tel* phone placeholder “Telephone Number”]
    [text* zip placeholder “Desired Zip Code”]
    [recaptcha id:cont-captcha class:cont-form-capt]

    [submit class:btn “SUBMIT”]

    Here is what I have in the “Mail Message Body”…


    First Name: [fname]
    Last Name: [lname]
    Email: [email]
    Phone: [phone]
    Zip: [zip]

    Campaign Source: [utm_source]
    Campaign Medium: [utm_medium]

    Am I missing something here? Any help you can provide would be appreciated.


  19. Nazrin Noorzan says:

    Anyone have try it with wpforms?

  20. Kobi says:


    I have installed this plugin on our website, integrated with JotForm, and the result was no less than amazing!

    BUT, we have an issue – that another JavaScript stop working:
    This is the Credit Card popup that we are using.
    The javascript starts with: <a href="javascript: (function(){try{var …..

    After the installation of your plugin, something is happening and the code gets an additional " after the javascript: which result in:
    <a href="javascript:" (function(){try{var ….

    Original: <a href="javascript: (function(){try{var
    Changed: <a href="javascript:" (function(){try{var

    This additional " is killing the javascript code so we can't charge our clients unless we deactivate your plugin.

    Any ideas on how to solve it?

  21. Kobi says:


    Did you org my message or can you send me the link to my email ?


  22. […] to pass UTM parameters to ActiveCampaign. Although there is no straightforward answer and may have several different ways to do it. Here, I’ll give a step-by-step tutorial about the vanilla way – using the […]

  23. Jon says:

    Hi.. after a day of work and success this morning plugin has gone wrong.

    You mention on a previous comment that Rocket Loader has caused issues in the page. (It’s the caching plugin that comes with CloudFlare).

    I turned rocket loader back on last night after getting a working setup (I normally turn Rocket Loader off when working on the site). Then this morning I noticed the UMT script no longer works.

    Despite turning it off, and refreshing WP caches everywhere, turning other plugins on and off and even loading a full site backup from yesterday your script is no longer grabbing the UMT data.

    I’m not sure what else would have caused the issue.

    It could be human error by me, but I’m a bit stuck.

    Tricky if that is the case as Rocket Loader really improves our loading speeds a lot.

    Has anyone else had issues in the past 24 hours?

    I’ve included a link to a test page in the website field below when sending this comment.

  24. Hey Haktan,

    Thanks for making this plugin, it looks amazing! Do you know if anyone has successfully integrated it with Divi’s opt in forms? I’m very new to this, but am trying to capture UTM data then send it to mailchimp, via Divi’s inbuilt optin form. I’m struggling to know what to do so any help you can give me would be massively appreciated!

    Thanks, Will

  25. Tim says:

    Hi – when someone registers their details via the website for http://www.tempusestate.com.au/register/ we need this then populated into salesforce. After installing and updating code, there still seems to be no tracking of UTM codes on Salesforce.

    Please see screenshots of code applied to form:


  26. Tim Sedgwick says:

    Hi my UTM codes aren’t being tracked and firing in Salesforce but UTM codes come through from contact form 7 mail

  27. Eli says:

    Is there a way to test to make sure that this is working properly?

  28. Byron says:

    Hi Haktan,
    We have installed the plugin and are using it on a link on our site. It is working as expected, but only when the user is logged in wp as an admin. Is there something we can modify so any visitor to the site can be tracked?

  29. Miguel says:

    I am wondering which is the best way to have these params in the WP plugin Bookly.
    Do you have any example?
    Many thanks in advance,

  30. Cristopher Garrido Martell says:

    Hi, i want to connect UTM hand to Hubspot, I have created the fields so that they have where to keep (in hubspot), but I am not sure how to send them from contact form7

  31. Susheel says:

    Thanks for this very useful plugin. I am using this for the last 1 month with contact form 7. The only problem that I am facing is that I am unable to set default UTM parameters values.

    Case 1
    My tracking url is http://www.xyz.com?utm_source=google_campaign
    As soon as person submit the form using the above tractable URL, we can see UTM Source was – google campaign.

    This is what I want to achieve in Case 2
    My tracking url is http://www.xyz.com
    As soon as person submit the form using the above without tractable URL, we can see UTM Source in the form – google campaign (default value).

    So, basically is there a way to configure it like – If utm value is not present in the url, use default value.

    Please suggest.

  32. Paula says:

    Hola excelente articulo, solo una pregunta,

    ¿puedo crear utm diferentes a las que ya existen para traer el campo ejemplo utm_ciudad ?

  33. Hi,

    I’m using SmartTheme (its a theme from OptimizePress plugin), and it has a integration to use native optinforms in the posts. I use this integration with activecampaign.

    I would like to know from witch URL the LEAD came from, that is possible?

  34. Juan Camilo Canal says:

    Hi! Is it possible to make it work with hidden fields in woocommerce fields with this plugin? https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/

  35. any says:

    Step for create zaiper hook

  36. Joel says:


    I am using WP Forms, do you have instructions for this plugin as well?

    I have tried adding the Default valie as [utm_source] and have also tried adding the custom CSS class as: utm_source without the wrappers, but neither of these work.

    What might I be doing wrong?

  37. Joel says:


    I am using WP Forms, do you have instructions for this plugin as well?

    I have tried inserting the shortcode [utm_source] in the Default Value in the Hidden field, I have also tried adding: utm_source to the Custom CSS class field. Neither is working. Do you have suggestions for how to make it work?

    Thank you for the help.


  38. Pawas Gupta says:

    Hi, in the contact form 7 shortcode shared all “&amp;lt;” and &amp;gt; to be replaced by “”.

  39. Winnie says:

    Hi, thanks for the plugin, it’s good to be able to track where the leads are coming from.

    However i’d like to check, what’s the name of the cookies that you save in the browser?

    Also, how long will the cookies be valid?


Wrap your code in <code class="{language}"></code> tags to embed!

Leave a Reply

E-mail address is required for commenting. However, it won't be visible to other users.

Loading Facebook Comments ...
Loading Disqus Comments ...