Loading external scripts through Optimizeley (social media sharing scripts)
Does anyone have experience running tests on a feature generated by an external script? I want to test a few different variations of social media sharing options. One example is that I want to run a test to see how having a pinterest sharing button that appears over images affects conversion rates and sharing. To add this feature to a site I would normally just include the script link that pinterest supplies and have the button:
<!-- Please call pinit.js only once per page -->
If I was working on this site alone I would probably just hard code that into the site and run a test to remove the button for some of the users and allow a few users visibility. (Is this even a good idea?) However, I am working with developers and I would rather not have to continue pestering them with adding in scripts for my tests. Is there a way that I can implement these scripts directly through optimizely?
Solved! Go to Solution.
Good question! I found some instructions on adding a Pinterest button here. Looks like you need to add the actual "Pin It" button to the HTML for every location you want it to show up and then you need to call the JS file only once.
To do this, you can either add the button images directly to your site's HTML, or you can click on the location you want to add the button and use the "Insert HTML" feature. Make sure you do not add <script> tags here, just add the button itself.
See attached for reference as well. Let me know if this does the trick for you or if you have any questions.
I have the problem, that I want to implement JS code for a MailChimp PopUp (the code is generated by MailChimp) with Optimizely on my site. Now when I paste in the code in the editor it does not work.
Do you think my problem could be solved with your solution of "load external JS"?
I already opened a discussion (https://community.optimizely.com/t5/Using-Optimizely/Insert-JS-Code-from-MailChimp-with-Optimizely/m...) but haven't found a solution yet.
Thanks for your answers!