I will like to know how possible it is to make copy change to a buy button (In an iframe). I currently do not have control of this iframe as it is built by another vendor.
The question is how do I bypass this (Iframe) using Optimizely . If this is possible can you guide me on how to achieve this?
var theNewButton = [
//The following changes can be made within the CSS section of Optimizely if your styling's global
Style the button's position to go where the current iFrame is and do something like so with the current iFrame:
If you're not seeing changes run properly, you can set a timeout.
That is a great question! Unfortunately, changes cannot be made on an iFrame that is not hosted on the same domain. This is due to the same-origin policy which is a security policy that prevents other sites from editing an iFrame.
Is there a way you can host the buy button on your site?
Thank you for your response. Tracking Youtube and Vimeo iFrames according to the article is a bit different. I'm not quite sure how they get around the allow-origin security option. My best guess is that the JS snippet Youtbue and Vimeo requires you to install allows your site to read the iFrame's callbacks events.