Adding GA code to a e-mail links. | Community
Skip to main content
April 3, 2013
Solved

Adding GA code to a e-mail links.

  • April 3, 2013
  • 4 replies
  • 1399 views
I cant create a link that is Valid in Marketo with a GA code.

I added. ?utm_source=newsUge14-2013&utm_medium=email&utm_campaign=Nyhedsbrev from a token after Each link.

The problem is that the mkt_tok is added after so every urs is looking like.

?utm_source=newsUge14-2013&utm_medium=email&utm_campaign=Nyhedsbrev?mkt_tok=3RkMMJWWfF9wsRonuKvAZKXonjHpfsX56%2B8uX6%2B3lMI%2F0ER3fOvrPUfGjI4AT8RhI%2BSLDwEYGJlv6SgFQrnHMbFqzbgFWBU%3D


The problem is the second "?" this is not valid and giving a wrong data for the campain in GA


there is no way i found to add the GA code after the ?mkt_tok=XXXXX&utm_source=newsUge14-2013&utm_medium=email&utm_campaign=Nyhedsbrev

the last link will be a right way to do it. But how to do it in the e-mail?

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

This is the right solition you need to add

url?{{my.gaTrack}}

and the value in tokken need to be: utm_source=newsUge14-2013&utm_medium=email&utm_campaign=Nyhedsbrev


the the test will be

http://mkto-e0184.com/trk?t=2&mid=ODkyLVFKVy04MzQ6NDU0OjA6MDowOjEzNzU6MDowOmpyQGF0Y29yZS5kaw%3D%3D&&&http://atcore.dk/blog/sadan-maler-du-en-trend-med-google/?utm_source=newsUge14-2013&utm_medium=email&utm_campaign=Nyhedsbrev&mkt_tok=3RkMMJWWfF9wsRow5%2FmYJoDpwmWGd5mht7VzDtPj1OY6hBktJbmJK1TtuMFUGpsqOOiKAg0CFoRzyQ1U

4 replies

April 3, 2013
This must be a problem with adding the utm_ tags via a token, so the system isn't seeing the token values as url parameters and is behaving as if it is appending the only parameters on the url.
Try adding a dummy first parameter on the url, and then start the token values with '&' instead of '?', that should fix it...
so url.html?dummyparam=dummyval{{token}}.  That way the system will see the '?' and know to append the mkt_tok with a '&'.
Accepted solution
April 3, 2013
Hi Grai.

This is the right solition you need to add

url?{{my.gaTrack}}

and the value in tokken need to be: utm_source=newsUge14-2013&utm_medium=email&utm_campaign=Nyhedsbrev


the the test will be

http://mkto-e0184.com/trk?t=2&mid=ODkyLVFKVy04MzQ6NDU0OjA6MDowOjEzNzU6MDowOmpyQGF0Y29yZS5kaw%3D%3D&&&http://atcore.dk/blog/sadan-maler-du-en-trend-med-google/?utm_source=newsUge14-2013&utm_medium=email&utm_campaign=Nyhedsbrev&mkt_tok=3RkMMJWWfF9wsRow5%2FmYJoDpwmWGd5mht7VzDtPj1OY6hBktJbmJK1TtuMFUGpsqOOiKAg0CFoRzyQ1U
April 3, 2013
Yes, even better, Jan.  Good fix.
February 19, 2015
Were either of you able to find a good way to tag all links with a default Google analytics tag? 

I'm assuming at the end of every link that you want tracking you're appending the token with tracking. I'm trying to think of more efficient ways to do this. So for example, utm_source=marketo&utm_medium=email&utm_campaign=emailsend this by default but potentially a way to populate each link by email so we get granularity.