Skip to main content
February 14, 2017
Question

How to combine UTM token with anchor link?

  • February 14, 2017
  • 1 reply
  • 29620 views

Hello,

Is it possible to combine a UTM tracking token (eg utm_source=marketo) with an anchor link (eg #pic2)? It doesn't seem to work from what I've tested so far as the anchor link needs to be the very last section in the URL, but the UTM tracking token needs to be last section as well.

For example if my URL is: www.website.com/stories#pic2/{{my.UTM-Encoding}}&utm_content=campaign1

It won't scroll to the #pic2 anchor link, but the UTM tracking is fine.

I can't make the URL like this either because it'll treat it as an invalid URL: www.website.com/stories/{{my.UTM-Encoding}}&utm_content=campaign1#pic2

Does anyone know how the syntax should work?

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Jim_Thao7
Level 8
February 14, 2017

The first thought that came to my mind is that you need a "?" to start your very first parameter off right.

Therefore, it should look something like this: www.website.com/stories/?{{my.UTM-Encoding}}&utm_content=campaign1#pic2

February 14, 2017

Thanks Jim.

That was actually a typo in my post, forgot to put the "?". But in my email the "?" is there. Problem still stands.

Jim_Thao7
Level 8
February 14, 2017

Syntax is correct then.  Syntax is not the issue.  Could be that the issue is probably how your domain resolves URLs.  Does it allow parameters?

Instead of clicking through to it from your email, try it organically with dummy values to see what happens. 

There are also other unknowns here, like, what is an example value for your token {{my.UTM-Encoding}}?  Is it complete, like "utm_medium=something" or is it just "something".

Please make sure that you check all of the features your'e using vs. just the syntax.