Automatically add utm parameters to links

Anonymous
Not applicable

Automatically add utm parameters to links

Other marketing automation tools I've used have allowed you to globally set a url tracking template that will be added to all links.  Is there a way to do this?  When we create emails with links in them, I want marketo to automatically add utm parameters to pass data to google analytics, like http:///www.example.com/?utm_medium=email&utm_source=email-name&utm_content=text-of-link

Having to manually add these parameters for every link is a huge time drain.

16 REPLIES 16

Re: Automatically add utm parameters to links

Hi Justin,

Not possible. Referenced here: Just do it! Marketo so-called minor missing features​ 

-Greg

Level 10 - Champion Alumni

Re: Automatically add utm parameters to links

use a spreadsheet with CONCATENATE. There's one on my site.

Level 5

Re: Automatically add utm parameters to links

Yes same as Josh, we created one spreadsheet with the drop down UTM values.

Anonymous
Not applicable

Re: Automatically add utm parameters to links

I'm not sure if this is helpful or not... we too create unique UTM parameters for each email and store those in an excel file (so no good answer there).  However, we put a token {{my.tracking}} in our templates at the end of every link... so that way we only need to copy and paste the UTM parameter in the email token once... and then it automatically adds it to every link in the email.

In the new 2.0 emails - you could probably also just make a global variable that is appended to every link in the email too.

Again - these don't help if you're wanting the whole UTM parameter to be created automatically... but they do help so that you only have to add the UTM parameter once to the email (instead of having to add it to every link within the email).

<a href="http:///www.example.com/{{my.tracking}}" target="_blank">Random Link Example</a>

Re: Automatically add utm parameters to links

There's also this bookmarklet I created to check for UTM params on all links. It won't add the params for you, but it'll run a pre-flight check to where they're missing.

I agree that tokens are essential minimizing the potential damage done by this missing feature.

Re: Automatically add utm parameters to links

Hi Ryan,

The global variable is indeed the way to go. You can probably combine with {{my. and the new {{program tokens and local variables so that all of you CTA's are "UTM Appended".

I'll run a test on this and share it.

-Greg

Anonymous
Not applicable

Re: Automatically add utm parameters to links

Hi Grégoire,

Did you run a test? Curious to get to know the result.

...

Re: Automatically add utm parameters to links

Hi,

When creating Email Templates in the new 2.0 with variables I added Local Variables to each module for both the link and the utm tag.

Here's an example:

Variables defined:

<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">

Edit: The new program token for name can also show the program name from where the traffic came from, works good if you have a good naming convention.

Then where I add the links into modules I put it in like this:

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

When editing each module it also allows me to for example add a &utm_content= if relevant or remove the whole utm string if it is irrelevant or linking to somewhere that would not support the querystring (exact link).

This can also be done by adding five variables, one for each utm_parameter and just have the default value blank like this:

<a href="${link-variable}?utm_source=${utm-source}&utm_medium=${utm-medium}...

To my knowledge if a link contains a blank utm_parameter with & following it should skip it in GA and add the next one.

/Erik

Re: Automatically add utm parameters to links

To my knowledge if a link contains a blank utm_parameter with & following it should skip it in GA and add the next one.

Yep, a query key with no value (&key& or &key=&) is considered a param with an empty value (rather than an error).