Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

Highlighted
Anonymous
Not applicable

Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

We use custom URL parameters in our Marketo emails with the source as email. Sometimes this comes through appropriately into Google Analytics, and sometimes it comes through as referral traffic from our tracking link. Any tips on how to get only the URL parameters into Google Analytics?

8 REPLIES 8
Highlighted
Level 1

Re: Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

I was just told that if your URL contains a #, it will strip out the parameters when it sends the info to Google Analytics.

https://example.com/#utm_source=Marketo&utm_medium=email&utm_campaign=Sample

Instead replace the # with a ?. I am going to test this out, but hopefully it was the same issue for you.

Highlighted
Level 10 - Community Moderator

Re: Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

If you include UTM parameters in the hash (after the #) then they aren't in the query string, ergo they aren't query parameters.

It stands to reason that they will not be interpreted as such (in the same way that they couldn't be used to fill form fields from the hash without custom code that knew where to look for them).

Highlighted
Level 1

Re: Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

Yes, this is how the Google Analytics UTM builder is now creating them, so it was easy to miss it that change when uploading links.

Highlighted
Level 10 - Community Moderator

Re: Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

how the Google Analytics UTM builder is now creating them

What official UTM builder is using the hash? That doesn't make any sense.

Highlighted
Level 1

Re: Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

Highlighted
Level 10 - Community Moderator

Re: Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

pastedImage_0.png

Highlighted

Re: Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

I'm curious if anyone has found any other reason for this happening. We have been having the same issue for months now and we can't figure out why (we don't have any #s in our urls). We've been going around and around with support about this and haven't gotten anywhere useful. In all fairness it may not be coming from Marketo, but we've only seen this happening on links coming from Marketo and not other sources which lead us in their direction. 

UTM parameters are very important to us as that is what feeds several things on our page that impact attribution reporting and the user experience.

So far the reasoning we have been given, although I'm not fully convinced of either reason:

- Email providers and spam checkers may be removing them

- There is a limit of url lengths which is 256 characters, the Marketo tracking code is 227 characters alone

Is there truth to any of the above? Are there any other possible reasons, anything else we are doing that may cause this? We do use a lot of tokens to build our URLs in many cases, so we're not sure if that is part of the problem or not? Sanford Whiteman​ maybe you have some insight?

Highlighted
Level 10 - Community Moderator

Re: Google Analytics Source Sometimes UTM Parameters, Sometimes Tracking Link

Is there truth to any of the above?

No.

The practical max length of a URL is in the thousands of characters, not 256. (URLs have no theoretical max length, but browsers implement proprietary limits, so if you want compatibility with older browsers you need to stay below the lowest of those limits. But that's not 256, it's 2048 -- way more than you will ever use with a few UTM params + mkt_tok.)

Email [clients] and spam checkers removing UTMs -- nah, that's not happening.

What you need to look at is the Activity Log detail for pageviews that you believe should have a URL including UTMs.  That will tell you whether the URL is being truncated.