Capture (Custom Event) Analytics in Iframed Dashboards

Example JavaScript

Example JavaScript in the Parent page that has the iFrame:

<script>  
   let messageList = [];  
   window.addEventListener("message", (event) => {  
     alert(event.data);  
if (event.origin !== "https://<your full domain name>")  
  // This domain isn't what we're looking for, simply return from the function  
  return;  
}, false);  
</script>

 

Events Captured

Events Captured:

  • User Active - the user is active and logged in

  • Dashboard Loaded - the dashboard frame has been loaded successfully

  • Advertiser Loaded - the advertiser for the dashboard has been loaded successfully

  • Tab Loaded - a page change in the dashboard was initiated

  • Date Changed - the date range has been changed for the dashboard

  • Dashboard Export Requested - the active user has clicked the link to generate and

    download the report version of the dashboard

  • Dashboard Export Complete - the download was completed

  • Logout - the user has logged out of the dashboard