GA tracking utm query params after hashbang
- by hybrid9
We currently use a hashbang for the portion of our site that generates dynamic content which can also be deep linked. Our analytics team wants to use utm params to track the referral traffic from social networks. We are using Universal Analytics (analytics.js) as well as GTM.
Will GA pick up the query parameters after the hashbang or does it always have to go before? For example:
example.com/#!/some/content?utm_source=foo&utm_campaign=bar
example.com?utm_source=foo&utm_campaign=bar/#!/some/content
In #1, I'm concerned that the utm params won't be recorded and in #2 the page will break or the url could be incorrectly written. How does GA pull in those parameters - location.search? regex?
Can I get away with using either?