Skip to main content
October 2, 2020
Respondido

Rule not firing on click event

  • October 2, 2020
  • 7 respostas
  • 2845 Visualizações

I'm trying to create a rule where when a user clicks an icon on the page the rule fires. The icon is however within an iframe, and i cannot target the URL. 

Este tópico foi fechado para respostas.
Melhor resposta por yuhuisg

Any user interaction within an IFRAME usually cannot be detected by the parent frame, which is where your Launch property is. And so Launch will not be able to detect those interactions/events.

If you can add code to the page in the IFRAME, consider using postMessage() in the IFRAME to send the event data up to the parent frame. Then within Launch, you can use window.addEventListener('message', callbackFunction) to handle those events as you wish.

7 Respostas

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorResposta
Community Advisor
October 3, 2020

Any user interaction within an IFRAME usually cannot be detected by the parent frame, which is where your Launch property is. And so Launch will not be able to detect those interactions/events.

If you can add code to the page in the IFRAME, consider using postMessage() in the IFRAME to send the event data up to the parent frame. Then within Launch, you can use window.addEventListener('message', callbackFunction) to handle those events as you wish.

October 5, 2020
I am quite new to this - is there a working example that i can follow anywhere?