Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizely #35

Open
jonathanng opened this issue Aug 11, 2014 · 2 comments
Open

Optimizely #35

jonathanng opened this issue Aug 11, 2014 · 2 comments

Comments

@jonathanng
Copy link

Anyone else having problems with Optimizely and Turbolinks?

@thinkmorebetter
Copy link

Yup. And this post is the only thing on the interweb about it.

@ethikz
Copy link

ethikz commented Sep 24, 2014

I seemed to have fixed the issue or at least a similar issue. I was having issues with optimizely not working with turbolinks so I added the script tag in the head and then in another js file I added a page:change and manually activated the experiments.

$(document).on "page:change", -> window.optimizely = window.optimizely or [] window.optimizely.push ["activate"]

With this you have to go into your settings on optimizely and change the activation method to manual.
The code above will start all but you can trigger a specific one by doing:

$(document).on "page:change", -> window.optimizely = window.optimizely or [] window.optimizely.push ["activate", EXPERIMENT_ID]

Hopefully this is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants