Rich-text Reply

Track clicks in Iframe

jewsbur0 08-30-16

Track clicks in Iframe

Hi guys,

 

I am trying to track clikcs on buttons that are "behind" an iframe. Every time I try and click on the buttons in Optimisely, all I can click on is the iframe in its entirety but not the specific buttons.

 

Any ideas on how I could do this? This is the page in question http://en.business.skyscanner.net/en-gb/products/white-label/ and the buttons are in the header.

 

Cheers!

Level 2

CouchPsycho 08-30-16
 

Re: Track clicks in Iframe

Hi,

 

u can use the same selectors which you already use to change the text. When creating the Click-goals open the advanced area and add the selectors for each button. In your case they are:

 

  1. div[data-collection-id=569f007e69a91a10688dcddf] p a:eq(0)
  2. div[data-collection-id=569f007e69a91a10688dcddf] p a:eq(1)
  3. div[data-collection-id=569f007e69a91a10688dcddf] p a:eq(2)

where to set the selector for click goals

 

If you use more than one selector within a click goal, do not forget to separate them with a ","

 

Kind regards

 

Michael




"the essence of the creative act is to see the familiar as strange." (anonymous)
jewsbur0 08-30-16
 

Re: Track clicks in Iframe

Hi,

Thanks for the response again!

Could you tell me how I would know what the selectors are for each button?

And also what it would look like exactly in the selector box?

Cheers,

Jack
Level 2
CouchPsycho 08-30-16
 

Re: Track clicks in Iframe

I had a look at your HTML-Code. If you are not familiar with selectors and jQuery, you may want to ask a developer of your team or -what i would recommend- take a tutorial or course in HTML/CSS/jQuery.

All these three will take you to warp-speed in optimizely-testing :-)

Kind regards

Michael



"the essence of the creative act is to see the familiar as strange." (anonymous)