Knowledge Drop

How to preserve JS Embed Event message passing across page changes in iFrame

  • 7 July 2021
  • 1 reply
  • 34 views

Userlevel 4

Last tested: Sep 10, 2020
 

When navigating pages within an iFrame, the embed domain is dropped from the iFrame src then the parent page will no longer receiving messages. Meaning that if you are using JS embed events and are intending those to persist across page changes you will want to make sure that the "links" you are navigating to from within the iframe have the embed_domain= parameter (containing the parent page origin) appended to them.

 

This content is subject to limited support.                

 

 


1 reply

I realized this is necessary when I stopped receiving events after navigation within the iframe - but how is it possible?

In an html section in particular. I don’t want to hard code something, we have so many different environments.

  dimension: link_to_dashboard{
sql: ${num} ;;
html: <a href="/embed/dashboards-next/lxZggFLq7XuorSFxlzIyK7?Number={{value}}">
<button>
Button Text
</button>
</a>
...}

 

Reply