Can I dynamically insert the Mailing Id into my URL links?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
  • (Edited)
I would like to be able to dynamically insert the Mailing Id into my URL links, either by having it added as a value for the Google Analytics UTM Content parameter or if not possible as a parameter in the URL. Does anyone know how this can be done?
Photo of Amanda Webb

Amanda Webb

  • 3 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 0
  • 1
Photo of Grey Stepp

Grey Stepp, Support Team Manager

  • 1700 Posts
  • 135 Reply Likes
Official Response
Hey there Amanda, 

Yeah, you can do this by adding the personalization tag [% mailing:mailing_id %] into the link.  You would want to manually create the Google Analytics link to include that personalization tag and put those links in your mailing as opposed to using the Emma Applied Google Analytics.  

It will look something like this:  http://www.xyz.com?mailingid=[% mailing:mailing_id %]&utm_source=test&utm_medium=email&utm_content=test&utm_campaign=test

Let me know if you have any questions!  

- Grey
(Edited)
Photo of Amanda Webb

Amanda Webb

  • 3 Posts
  • 0 Reply Likes
Thanks for your help.  So I could add to the URL like:  http://www.xyz.com?mailingid=[% mailing:mailing_id %]&utm_source=test&utm_medium=email&utm_content=test&utm_campaign=test and the mailing id should pass through (we created the parameter "mailingid" as custom dimension in Google Analytics.  You can make this public. I didn't realize I posted as private at first and then repost again as public when I realized. 

Thanks
Photo of Grey Stepp

Grey Stepp, Support Team Manager

  • 1700 Posts
  • 135 Reply Likes
Hey Amanda!  

Yeah, that should do it!  You'll want to send yourself a test first to make sure that it works before sending the campaign.  

That being said, I went ahead and tested that using myemma.com and it sent through just fine!  

Let me know if you have any further questions!  

- Grey

p.s.  I moved your example into my first answer so it could be in the same place.  Thanks for your help!  :) 
(Edited)