Optimizely's scroll depth tracking sample code not working
window['optimizely'] = window['optimizely'] || ;
I get this error message
['optimizely'] is better written in dot formation
And it won't let me save the code.
How to fix the code?
@Gabriella Thanks for posting this. I was just testing this out with @Becca_Bruggman and we did see the error, but you should be able to ignore it and click the save button. In our tests it did save successfully.
What are you seeing that leads you beleive it's not saving? Is there a console error or is the button grayed out?
Looking forward to hearing back from you
I am in the process of testing this scroll sample snippet on my site and I can't get it to work either.
The default engagement event is firing fine however there seems to be a confliction in Jquery libraries.
- When I inlcude your jquery in my project we get an "uncaught error" on the .scrollTop() function. If we hard code e.g. window.scrollPercent=25; the event fires. Seems to suggest a confliction of the function.
- When Ijust use our jquery and don't include yours (ours is v1.4.2) the event doesn't seem to fire at all
@Gabriella try using the /?optimizely_log=true url parameter and checking the jS console. You may be having the same problem as I'm having. This should help debugging.
I am trying to implement scroll tracking beforehand I can start working on the actual project. At the moment I have not added optimizely snippets on the website (i don't yet have rights to add it in the website script).
Is there any way I can confirm scroll events are firing before starting the experiment or before even putting optimizely snippet on the website?