Automatically append Google Analytics campaign tags to email links

Options
Is there a way to have LO automatically attach Google Analytics campaign parameters (utm_source; utm_medium; utm_campaign) to every link in our emails? 


If it's not built in, has anyone found a way to do it programatically, either in a template or in a text editor?


I realize that we can manually add Google Analytics campaign tagging, but that's a tremendous drain on resources for something that should be very easy (and is in other platforms).


Thanks in advance.
Tagged:

Comments

  • Reid Dossinger:

    Is there a way to have LO automatically attach Google Analytics campaign parameters (utm_source; utm_medium; utm_campaign) to every link in our emails? 


    If it's not built in, has anyone found a way to do it programatically, either in a template or in a text editor?


    I realize that we can manually add Google Analytics campaign tagging, but that's a tremendous drain on resources for something that should be very easy (and is in other platforms).


    Thanks in advance.

    There isn't as far as I know. We just have our content writers add dummy values to links (luriechildrens.org?utm_tags) and then do a find and replace. We don't create emails in LO, so we're in a code editor anyway.


    You could put the utm tag string in a session variable, and then read them in your links. The docs say it session tags don't work in email, but they seem to for us. You just have to make sure the U0 tag is above your S80 tags in the content. Not sure how that would be easier then find/replace though.


    [[U0:utm_tags=[[E130:utm_campaign=idea&utmsource=bpm]]]]


    Go to <a href="google.com?[[S80:utm_tags]]>google</a>


    Most code editors have the ability to create macros. Ultraedit has perl macros and JS scripts, which you could probably use to do what you're after a bit better than find and replace.

  • Very helpful, Brian. Thank you! That ?utm_tags trick is simple but great. I hadn't thought of that. Thanks again!
  • Brian Mucha:

    Reid Dossinger:

    Is there a way to have LO automatically attach Google Analytics campaign parameters (utm_source; utm_medium; utm_campaign) to every link in our emails? 


    If it's not built in, has anyone found a way to do it programatically, either in a template or in a text editor?


    I realize that we can manually add Google Analytics campaign tagging, but that's a tremendous drain on resources for something that should be very easy (and is in other platforms).


    Thanks in advance.

    There isn't as far as I know. We just have our content writers add dummy values to links (luriechildrens.org?utm_tags) and then do a find and replace. We don't create emails in LO, so we're in a code editor anyway.


    You could put the utm tag string in a session variable, and then read them in your links. The docs say it session tags don't work in email, but they seem to for us. You just have to make sure the U0 tag is above your S80 tags in the content. Not sure how that would be easier then find/replace though.


    [[U0:utm_tags=[[E130:utm_campaign=idea&utmsource=bpm]]]]


    Go to <a href="google.com?[[S80:utm_tags]]>google</a>


    Most code editors have the ability to create macros. Ultraedit has perl macros and JS scripts, which you could probably use to do what you're after a bit better than find and replace.

     



    Hey Brian, are you saying that you've done something like this?


    [[U0:trID=1234]]

    <a href="http://sub.domain.org/site/TR?fr_id=[[S80:trID]]&pg=entry">your TR event</a>


    Whenever I've done that in the past, it redirects with the session var dropped (e.g. http://sub.domain.org/site/TR?fr_id=&pg=entry). Only tag I've seen work correctly is [[S42:1234:whatever]] (where the fr-id is hard-coded).

Categories