First, Last and Multi Touch attribution for UTM parameters and auto tagging emails

Working with cross-channel marketing, where you have a lot of different entry points to your landing pages, it’s a good idea to keep track of which sources, campaigns, content variants and more are generating traffic and which are converting on your content.

One thing I noticed is that it can get quite messy to keep track of touch points, traffic sources and much more in a manner that doesn’t for example require exploring an activity log for an interesting lead, going through interesting moments for an individual, or sifting through the Opportunity Influence Analyzer (great report but requires manual follow-up).

Grabbing UTM Parameters in hidden form fields

This one is a pretty well-known tactic that allows you to autofill a chosen field with a value from any parameter in the query string of your URL, it will be key to set up for the following parts and more information can be found here: Set a Hidden Form Field Value - Marketo Docs - Product Docs

Preparing Marketo for tracking five different UTM Parameters

The normal uses of UTM parameters are Campaign, Content, Medium, Source and Term. More information on these and their uses can be found on Google’s URL builder: Campaign URL Builder — Google Analytics Demos & Tools

The first step would be to create a custom field for each of these parameters in order to allow for getting the data into Marketo when a lead converts on a form. If they came in to your website through a sponsored ad, you should know what source, medium, campaign and content drove this conversion. I would recommend using a naming convention for your custom fields so as to not get them lost/forgotten or mixed up with your fields that came out of the box, more on that here.

Now instead of only tracking a lead’s last touch on a UTM parameter, I would recommend creating corresponding First and Multi-touch fields to be able to track the first touch value a lead had when converting, the last one and a log of all values (this proves to be important in the next step), looking something like this:

pastedImage_25.png

We use the prefix AMI for Avaus Marketing Innovations, you should decide how you want to name/structure your field names.

Setting up forms and a smart campaign for assigning values across fields

Once these fields are in place you should make sure to set them as hidden fields in all your forms. The ones that are needed for this are the Last Touch fields, as a form conversion will always be the last touch and a smart campaign will be used for assigning values to the first and multi-touch fields.

Form setup

Add all the LT fields into your form as field type Hidden, configure autofill settings for each field for the corresponding UTM parameter. From my example above, the field AMI_LT_Source would be configured with the parameter utm_source, like this:

pastedImage_30.png

To make this process easier it would save you time and make everything more scalable to use global forms for your different form types (content, event, newsletter sign-up, contact, etc), which you can read more about here.

Smart Campaign setup

You will need a Smart Campaign to assign values to your First and Multi-touch fields. In order to avoid an excess of Data Value changes triggers, this can be done with 5 Smart Campaigns (one for each utm_parameter).

Trigger:

Data Value changes – LT field (the one used in your form) as well as a Lead is created trigger with the filter for the same field not being empty (since most times a data values changing from null to a first value does not trigger a data value change).

pastedImage_35.png

Flow:

pastedImage_36.png

pastedImage_37.png

1. If the FT field is empty, it will be populated with the LT field value, otherwise nothing will happen.

2. a) If the MT field is empty it will be populated with the System Date/time and the FT value. The system token here could get unnecessary and make the MT field quite long so it’s all up to the person making it.

2. b) If the MT field is not empty it will add the LT field first and concatenate the MT field after with a divider:

{{system.dateTime}} {{lead.AMI_LT_source}} | {{lead.AMI_MT_source}}

The Multi-touch field is great if you have a lot of touch points that leads run through and it can give a good overview that can be used in alerts.

Note: There are a few different ways of making this setup, if this does not work for you I would suggest setting up a separate smart campaign for when leads are created with a wait step and to assign values to first touch fields. Also you could optimize this by only listening for data value changes in the most common parameter/or form fills with filters and requesting other campaigns for the other fields. I will not cover this here because it requires a complex structure that is in most cases unique to your setup.

For more information on load balancing and slowdowns in instances, Josh Hill covered the topic in a well-written post here: Load Balancing in Marketo and Marketing Automation - Marketing Rockstar Guides

Auto tagging your emails with predefined UTM parameters

Now assuming you have a tagging strategy in place with naming conventions for Internal banners/CTAs on your website, Retargeting, Paid Social, Organic Social, AdWords, + more.

To give a holistic tracking for all your emails in Marketo (including Newsletters, Snippets, Nurturing, Events), you would want to ensure that these assets get tagged and are tracked both in Marketo on conversion but also in Google Analytics.

For this you would need both a set naming convention for your Marketo programs and to make some changes to your email templates.

Setting up local variables in your templates:

<meta class=”mktoString” id=”link-variable” mktoName=”URL” default=”#” mktoModuleScope=”true”>

<meta class=”mktoString” id=”utm-tag” mktoName=”UTM” default=”?utm_source=mkto&utm_medium=email&utm_campaign={{program.Name}}” mktoModuleScope=”true”>

Adding the variables to each module/link:

<a href=”${link-variable}${utm-tag}”>

Note: At the moment of posting, variables are not supported in text versions of emails and should be edited separately (for links) or removed (for parameters) in text versions. I have covered this in a separate post which can be found here: Email 2.0 Hack - UTM Parameters as local variables

This has definitely proven to be a good use-case when there are a lot of Marketers using the same instance, some work with only Newsletters, some with Content, others with Events.

Having the tagging in place with utm_campaign (or whichever you wish to use) with the default value {{program.Name}} gives you insights as to which programs are generating traffic to your website and is especially useful when you have goals setup in Google Analytics and even more interesting with E-commerce where you can track the exact revenue generated in your webshop from different Marketo programs.

Other uses for Multi-touch fields

Using a trigger for Program Status changed with Success = True:

You can use a LT field for populating the program name with a trigger token {{trigger.Name}}, then having a second flowstep for adding this to a MT log of program successes to see which programs a lead has converted on.

Creating a content download log:

Having two fields e.g. “Last Downloaded Content” and “Content Download History”, where the former is used in your program templates for downloadable content in a Change Data Value flowstep by default on conversion, “Downloaded {{my.Content Name}} on {{system.date}}”, and concatenating this value on the latter field. This creates a great log for lead alerts.

Hope this will help anyone who has the need to set up something similar

For more tips and tricks, feel free to check out more here

35448
61
61 Comments
Leanne_Persang
Level 4

Thanks, Erik - just what I was looking for! Question regarding:

Using a trigger for Program Status changed with Success = True:

You can use a LT field for populating the program name with a trigger token {{trigger.Name}}, then having a second flowstep for adding this to a MT log of program successes to see which programs a lead has converted on.

Our campaigns are organized by Channel type - i.e., trade show, email, social media, nurture, webinars, etc. Each of those channels has a success step specified. For example: Filled Out Form - Success or Engaged - Success, depending on the channel (when we started using Marketo the consultant helped us to set these basic channels). Assets that fit the channels get placed in each folder respectively. For example, a landing page that a Facebook post points to would get placed under the "Social Media" folder. However, a banner ad on the company home page could also point to this landing page -- that is where is starts to get confusing with where to place such a campaign and track touchpoints and successes.

Enter the cross-channel campaign - which you cover above. So, for example, say we have a landing page that has a form on it which is the last touch, but the initial touch may be Facebook, company website, or email. Do you recommend creating a "Multi-Touch" channel type and placing multi-touch assets that meet the criteria here? Then, setting up the success step as Filled Out Form (with other non-success steps as Opened Email, Clicked Link, Visited Website).

Also, do you use Marketo's Lead Source field? Or does the FT_Source get used instead?

Thanks!

Dan_Stevens_
Level 10 - Champion Alumni

Hi Leanne - sounds like your environment is setup similar to ours - by channel:

pastedImage_0.png

And then within each channel, we have the related programs; and within each program, all of the assets (except for images and files, of course) and smart campaigns.  Here's a sample program in the Events folder:

pastedImage_1.png

What you haven't mentioned in your post is your use of PROGRAMS.  Are you using Programs in your folders, or just campaigns?

Leanne_Persang
Level 4

Hi Dan, you are correct -- ours is set up the same way. We are using programs like you and then campaigns within the programs (sorry for the confusion).

My issue is whenever you set up a program, you must select a channel -- and within each channel there is a designated success (or successes). If my program has an email and a landing page with a form where the landing page may be used for multiple channels (social, email, website) -- what channel do I select? social - email - website? Seems redundant to create separate programs for each case.

Dan_Stevens_
Level 10 - Champion Alumni

That scenario is common for us.  Let's say we have a piece of gated content - either on our website or on a Marketo LP.  We'll create a separate program in our "Website Content" folder.  Success is achieved in either of the following smart campaigns:

pastedImage_0.png

In a month from now, let's say we execute an email campaign to further promote this content.  We'll setup a separate program as follows:

pastedImage_2.png

As you can see, ultimate success (downloading the content) is done in the master content program.  While there will be success steps defined in each program, the definition of success differs by channel.  So in this case, we track the effectiveness of each channel that promotes each piece of content; and overall at the content level.  On top of that, we include three hidden fields on every one of our forms (for the three UTM parameters (channel, source, campaign) - and have recently deployed the FT/MT/LT approach that Erik has described here.

Anonymous
Not applicable

This is great!

Leanne_Persang
Level 4

Hi Erik (or any coder out there) --

I am adding the code to my email templates (GREAT IDEA - TIME SAVER):

<meta class=”mktoString” id=”utm-tag” mktoName=”UTM” default=”?utm_source=mkto&utm_medium=email&utm_campaign={{program.Name}}” mktoModuleScope=”true”>

But, I have a question about adding the variables:

Adding the variables to each module/link:

<a href=”${link-variable}${utm-tag}”>

The utm-tag is defined in the template. Where is the link-variable defined? Is this the correct way to apply this:

<a href=”http://companywebsitelink1.com${utm-tag}”>

<a href=”http://companywebsitelink2.com${utm-tag}”>

<a href=”http://companywebsitelink3.com${utm-tag}”>

Thanks!

Erik_Heldebro2
Level 8

Hi Leanne,

Thank you, glad you liked it.

In this case ${link-variable} is a local variable (unique inside a module) that is defined as well in the template. This you will of course only work if you are using modules in a v2 template. Something like:

<meta class=”mktoString” id=”link-variable” mktoName=”URL” default=”#” mktoModuleScope=”true”>

Otherwise you can add the utm-tag variable as a Global Variable (take out the mktoModuleScope="true" part) and add it next to your links in the template. I would recommend the first solution though.

More on this here: Email 2.0 Hack - UTM Parameters as local variables

Leanne_Persang
Level 4

Thanks! We are using the v2 templates. However, when I add the following between the <head></head> tags:

<meta class=”mktoString” id=”link-variable” mktoName=”URL” default=”#” mktoModuleScope=”true”>

<meta class=”mktoString” id=”utm-tag” mktoName=”UTM” default=”?utm_source=mkto&utm_medium=email&utm_campaign={{program.Name}}” mktoModuleScope=”true”>

The modules do not appear when I edit the email using the updated template:

pastedImage_0.png

Also, how does this work if your email has multiple URLs?

Erik_Heldebro2
Level 8

Hi Leanne,

This solution would be specific for v2 templates coded for supporting modules. Meaning you have a fixed block that you can duplicate, move or remove in your defined email container.

Marketo covers this in the docs: Email Template Syntax - Marketo Docs - Product Docs

I also covered this in a post Getting the most out of Marketo’s new Email Editor

If you do not currently have modules you can always just skip the variable for links and just add the utm variable as a global variable to your template, like this:

<meta class=”mktoString” id=”utm-tag” mktoName=”UTM” default=”?utm_source=mkto&utm_medium=email&utm_campaign={{program.Name}}”>

/Erik

Anonymous
Not applicable

This is very helpful, I love the idea of adding the utm-tags to the email templates.

Do you have any thoughts as to how these UTMs work when you shorten links for your social channels?