Skip to content

Instantly share code, notes, and snippets.

@brianaohern
Created July 27, 2018 17:28
Show Gist options
  • Save brianaohern/471f05e5507c97175bb048363affec06 to your computer and use it in GitHub Desktop.
Save brianaohern/471f05e5507c97175bb048363affec06 to your computer and use it in GitHub Desktop.
WordPress JavaScript Example
<?php wp_footer(); ?>
// Your JavaScript goes below
<script type="text/javascript">
// This example calls om.Campaign.init runs once the campaign is initialized
document.addEventListener('om.Campaign.init', function(event) {
// This event is passed the Campaign object
console.log(event.detail.Campaign);
// Additional JavaScript here
} );
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment