Re: Populate a field with the UTM Campaign querystring variable

Anonymous
Not applicable

Populate a field with the UTM Campaign querystring variable

Hi,

We have fields setup for 'UTM Source', 'UTM Medium' and 'UTM Campaign'. The first two are fine because we have a 'change data value' controller smart campaign setup with very specific instructions, i.e. if the querystring contains 'linkedin' then populate the UTM Source with 'linkedin', same for UTM Medium' is working fine with entries such as 'PPC', 'Email', etc.

What we now want to do is populate the 'UTM Campaign' field with whatever variable is in that parameter of the UTM querystring, i.e. our-great-new-blog-article, or 10-things-to-do-in-sydney-on-a-rainy-day, or whatever it might be, there would be many as we wouldn't be able to setup controller smart campaigns for every individual article with that specific title in. Basically we want to populate the name of the article (within the querystring) into this 'UTM Campaign' field using the 'change data value' .... or something else if you could recommend.

Thanks.

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Populate a field with the UTM Campaign querystring variable

Typically utm_* query params -- or any other query params -- are mapped to Marketo lead fields upon conversion, not simply upon a Visit Web Page event. In other words, the last value for a query param (which might have been saved to a cookie to persist across pages) is used to AutoFill a Hidden form field.

If you want to send individual field values outside of a form, you have basically 3 choices:

  1. Use the Munchkin associateLead method. This requires an active back end or something else that can generate Munchkin associator tokens securely. You can read more in this post.
  2. Use a webhook, passing {{Trigger.Web Page}} to the webhook and then parsing the results into individual fields.
  3. Use the trick I outlined here.