0

We are working on adding google tags in our urls and we are using google url builder.However the URL's formatted through the url builder is not working.I am passing some dynamic parameters in the google tags .I am passing the following parameters %%__AdditionalEmailAttribute1%%,%%__AdditionalEmailAttribute2%%,%%=FormatDate(SystemDateToLocalDate(NOW(1)),"yyyyMMdd")=%%,%%linkname%%

the URL generated by google is https://www.google.com/?utm_source=%25%25__AdditionalEmailAttribute1%25%25&utm_medium=email&utm_campaign=%25%25%3DFormatDate(SystemDateToLocalDate(NOW(1))%2C%22yyyyMMdd%22)%3D%25%25&utm_term=%25%25linkname%25%25&utm_content=%25%25__AdditionalEmailAttribute2%25%25

the above link just passes the attributes as it is.Values are not substituted.

And the below URL i have constructed manually,which is working except for the date and link name,

[working url][ https://www.google.com?utm_source=%25%25__AdditionalEmailAttribute1%25%25&utm_medium=email&utm_campaign=%25%25=FormatDate(NOW(1),%22yyyyMMdd%22)=%25%25%20&utm_term=%25%25linkname%25%25&utm_content=%25%25__AdditionalEmailAttribute2%25%25&uid=%25%25_subscriberkey%25%25&uem=%25%25emailaddr%25%25]

[2]: https://www.google.com?utm_source=%%__AdditionalEmailAttribute1%%&utm_medium=email&utm_campaign=%%=FormatDate(NOW(1),"yyyyMMdd")=%% &utm_term=%%linkname%%&utm_content=%%__AdditionalEmailAttribute2%%&uid=%%_subscriberkey%%&uem=%%emailaddr%%

Can somebody help me in solving this issue.

0

It looks like the Google URL builder is encoding the percentages which will cause Marketing Cloud to not substitute the values.

Do you need to use the URL builder? You can always set the constant values using AMPscript at the top of the email, Concat them into a string and then Concat that onto the end of your URLs. Example:

SET @utm_campaign = 'examplename'
SET @utm_content = 'examplecontent'
SET @googleTracking = Concat('?utm_campaign=',@utm_campaign,'&utm_content',@utm_content)
SET @URL = Concat('http://google.com',@googleTracking)

You can put a RedirectTo(@URL) in the anchor tag to get the link working or do the URL concat in the anchor tag if you have varying links and changing 'linknames'.

Hope this helps.

  • hi Hamish ,i would like to pass the banner information that is clicked by the user.But those banners will be keep on updating not a static one and an email may contain multiple banners.So using amp scripts will not be a good option.Also this configuration should not require developer support – Manoj Chandran Sep 28 '17 at 10:13
  • Hey Manoj, you can setup AMPscript to be quite simple to update and therefore will not require any developer support. However, if the Google URL creator doesn't work then try creating an excel document which will concat together a URL instead. You can use this as a standard to create your URLs. – Hamish Wilson Oct 2 '17 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.