Skip to content

Instantly share code, notes, and snippets.

@BrainBacon
Created November 5, 2015 00:02
Show Gist options
  • Save BrainBacon/92765417fa24621279ab to your computer and use it in GitHub Desktop.
Save BrainBacon/92765417fa24621279ab to your computer and use it in GitHub Desktop.
Modified unbounce embed script to allow global `_ubaq` variable declaration inside a closure
window._ubaq = window._ubaq || [];
window._ubaq.push(['trackGoal', 'convert']);
(function() {
var ub_script = document.createElement('script');
ub_script.type = 'text/javascript';
ub_script.src =
('https:' == document.location.protocol ? 'https://' : 'http://') +
'd3pkntwtp2ukl5.cloudfront.net/uba.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ub_script, s);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment