Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Harrisons latest version: https://gist.github.com/harrisonkrat/6519d49b7102f361c992
@harrisonkrat

This comment has been minimized.

Copy link

harrisonkrat commented Jan 11, 2016

Hi @nils, I created a new fork here - I think we need to refer to window.whatReferrer in the variation code to access that variable.

@Nils-van-Kleef

This comment has been minimized.

Copy link
Owner Author

Nils-van-Kleef commented Jan 12, 2016

@harrisonkrat I updated this code snippet too with it. Thanks for the update!

@circAssimilate

This comment has been minimized.

Copy link

circAssimilate commented Jan 13, 2016

@nils, can we put line 38 in experiment JS instead?

@Nils-van-Kleef

This comment has been minimized.

Copy link
Owner Author

Nils-van-Kleef commented Jan 13, 2016

@circAssimilate: I learned from @harrisonkrat that this is not possible. Our current Project JS code doesn’t have anything in place that checks if a redirect is running; it just globally gets and sets some cookies for referrer. The variation code is what actually sends the info to GA, and that’s the only place we want it to happen because that is where we know a redirect is happening.

@harrisonkrat

This comment has been minimized.

Copy link

harrisonkrat commented Jan 14, 2016

@nils I updated my original comment in ECO-878 and my fork here. This code has been confirmed to work by Progress/Telerik and Practice Fusion.

Progress did some extra modifications in their GTM implementation, but the core idea of the code is there. Practice Fusion doesn't have Project JS, so they implemented this code directly on their site.

@Nils-van-Kleef

This comment has been minimized.

Copy link
Owner Author

Nils-van-Kleef commented Jan 15, 2016

Thanks @harrisonkrat! I've updated my gist to match yours so I don't have to worry about giving out the wrong code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.