wistia / fresh-url

Drop this script on your page and enjoy the freshest of URLs
270 stars 30 forks source link

script seems not waiting for GTM scripts #5

Closed jiriq closed 10 years ago

jiriq commented 10 years ago

Hi, I found your script and I like it, so I tried to use it on our company website. It works fine, but we have noticed that Google Analytics is counting only about 60% of url utm parameters, so I had to put it away. We are inserting analytics code via Tag Manager. I have read whole readme, but didn't find what could be wrong. Do you have any clue? Thanks

bschwartz commented 10 years ago

Hey, sorry to hear it's not working as advertised. I'm guessing that it wasn't properly detecting GTM or GA or some combination. It's going to be hard for me to figure out exactly what is wrong without seeing your site. One thing you could try is to explicitly force it to wait for GA rather than letting it try to auto-detect it:

<script>
var _freshenUrlAfter = ['googleAnalytics'];
</script>
<script src="//fast.wistia.net/labs/fresh-url/v1.js" async></script>