AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
3K members online now
3K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Language settings screwing up UTM tagging (adding amp; in link)

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hello! 

Our web is set up such a way, that cookies remember, what language you chose last and when you come to our web the next time, you will be automatically redirected to whatever was your previous language setting. 

Turns out that screws the UTM tags in the link.


Example:

Let's say our default language is english. So when you go to services page, the URL is www.mydomain.com/services 

Customer wants to see that page in spanish, the URL changes to www.mydomain.com/es/services

Now the customer clicks on UTM tagged link, that refers to english site: 

www.mydomain.com/services?utm_source=test&utm_campaign=test&utm_medium=test 

Because the cookie remembers, that this customer wants to see this page in spanish, it does a redirect and adds "amp;" in front of & character like this:

www.mydomain.com/es/services?utm_source=test&utm_campaign=test&utm_medium=test 

This results in GA not understanding the campaign and medium of this link anymore (it still understands the source).

Has anyone encountered this problem before?

Or can anyone make an educated guess of how to solve it?

 

Cheers,

Karin 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Karin K
February 2017

Language settings screwing up UTM tagging (adding amp; in link)

Participant ✭ ☆ ☆
# 3
Participant ✭ ☆ ☆

Hi, @Karin K

You need to contact your developers to fix the redirect. They need to adjust redicrect to pass utm_ parameters and possibly any other url parameters to the redirected page untouched (not converted to HTML entities like &ampSmiley Wink

If your site uses javascript redirect your developers can use hitCallback option of google analytics to perform redirect after google analytics hit data have been sent https://developers.google.com/analytics/devguides/collection/analyticsjs/sending-hits#hitcallback

View solution in original post

Language settings screwing up UTM tagging (adding amp; in link)

Top Contributor
# 2
Top Contributor

Hi @Karin K this needs to be solved with correctly encoding when redirecting to new URL as & is basically the same as &. So by any means get in touch with whoever manages the site (tech perspective) and explain the problem - it should be easy to solve. 

 

Kind regards,

Zorin

Web analyst @ escapestudio.net
Marked as Best Answer.
Solution
Accepted by topic author Karin K
February 2017

Language settings screwing up UTM tagging (adding amp; in link)

Participant ✭ ☆ ☆
# 3
Participant ✭ ☆ ☆

Hi, @Karin K

You need to contact your developers to fix the redirect. They need to adjust redicrect to pass utm_ parameters and possibly any other url parameters to the redirected page untouched (not converted to HTML entities like &ampSmiley Wink

If your site uses javascript redirect your developers can use hitCallback option of google analytics to perform redirect after google analytics hit data have been sent https://developers.google.com/analytics/devguides/collection/analyticsjs/sending-hits#hitcallback

Language settings screwing up UTM tagging (adding amp; in link)

Follower ✭ ☆ ☆
# 4
Follower ✭ ☆ ☆

Thanks guys! I was so hoping I could do this myself but I will involve developers in that case Smiley Happy