3 Replies Latest reply on Jul 17, 2017 9:00 PM by 2651260

    Trying to append tracking information to a URL from a Merge Field


      Good morning. 


      1) If I have a URL coming into an Eloqua field via a form, and that field will then be used as a link in an email via a merge field - is it possible to append campaign parameters for tracking purposes?


      For example:


      <a href="~~eloqua..type--emailfield..syntax--Quote_URL1..innerText--Quote_URL1~~">Customize and Adjust your estimate</a>


      I believe I would just add:


      ?utm_source=Mktg&utm_medium=EMAIL&utm_campaign=FirstTimeVisit&utm_term=TEST&utm_content=CTA to the end of the above code. For example:


      <a href="~~eloqua..type--emailfield..syntax--Quote_URL1..innerText--Quote_URL1~~?utm_source=Mktg&utm_medium=EMAIL&utm_campaign=FirstTimeVisit&utm_term=TEST&utm_content=CTA">Customize and Adjust your estimate</a>


      Is that correct?


      2) Also, what if I wanted the Source parameter, to be a variable field from merge data? For example, if I had a merge field "Group Name", and I wanted the campaign source to be based on the variable content in the merge field "Group Name".  Is that possible? And if so, how can that be accomplished?


      Thank you,



        • 1. Re: Trying to append tracking information to a URL from a Merge Field

          Hi Janet,


          Overall, what you said is very possible - but it may actually be cleaner to use the field merge span tags instead.  Following your example:


          <a href="<span class='eloquaemail' >AddressFieldSystemName</span>?utm_source=Mktg&utm_medium=EMAIL&utm_campaign=FirstTimeVisit&utm_term=TEST&utm_content=CTA">Customize and Adjust your estimate</a>


          Then if you want to also make source also into a field merge:


          <a href="<span class='eloquaemail' >AddressFieldSystemName</span>?utm_source=<span class='eloquaemail' >GroupName</span>&utm_medium=EMAIL&utm_campaign=FirstTimeVisit&utm_term=TEST&utm_content=CTA">Customize and Adjust your estimate</a>


          However, with the source values, since you did mention they would be dynamic, does each contact record have a source value or would this be more based on a set of rules in Eloqua or would it be based on a form value as well?  Also, could you kindly remind me how you are adding in your field merges into your A Href tags?  Normally field merges uses span tags when dropped in, and I do recall seeing it many times in the format you posted in but just oddly can't force it in like that in my quick tests.


          In any case, let me know if you have any further questions on this and I would love to continue to help.


          Best Regards,

          Hong Tai Lee

          • 2. Re: Trying to append tracking information to a URL from a Merge Field

            Hi Janet,


            As a second part to this, could you tell me where you are storing these values and how these values would be populated and how it should be sent it?  I'm assuming that the values are indeed being stored in either a CDO or contact field, but I do know in "Email Defaults > tracking" campaign fields that you fill in the campaign itself could be used to populate that sort of UTM parameter.


            In any case, looking forward to hearing back.

            • 3. Re: Trying to append tracking information to a URL from a Merge Field

              Hong Tai,


              The URL is a contact field and the source [or "Group Name"] for the UTM parameter is a Custom Object field.


              Both pieces of information are coming from a form submission, and would always be present with each submission.


              One of our developers had set the syntax up like that for the URL. However, he is no longer with the company. I just tried it myself, and when I insert the merge field I also get the span tags. EX: <a href="<span class="eloquaemail" >Quote_URL1</span>" data-targettype="webpage">.


              I will give that a try, incorporating the variable utm parameter with the span tags.


              Thank you for your help!