(function(global){
  // Set global to always reference the outer context's window
  // Applicable when the script runs inside a FIF
  if(global.inDapIF){
    global = global.top;
  }

(function(global){
  // Set global to always reference the parent window context
  // Applicable when the script runs inside a FIF
  if(global.inDapIF){
    global = global.parent;
  }

Set global object to the parent of the current frame when inside a FIF
Set global object to the parent of the current frame when inside a FIF

This fixes a problem with Same-origin security policy when analytics
is loaded inside another iframe.

The error:
DOMException: Blocked a frame with origin "http://www.<domain>.com" from accessing a cross-origin frame
