Created
August 31, 2015 23:58
-
-
Save recyclerobot/f056953f3e0749b2a942 to your computer and use it in GitHub Desktop.
Revisions
-
recyclerobot renamed this gist
Aug 31, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
recyclerobot created this gist
Aug 31, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ // Forward all postMessage calls from the iframes that have data in the form {method:, arguments:} directly to Segment. window.onmessage = function(e){ var method = e.data.method; var args = e.data.arguments ? _.values(e.data.arguments) : null; if (analytics[method]) { analytics[method].apply(analytics, args); } };