Skip to content

Instantly share code, notes, and snippets.

@ed-codes
Created May 15, 2019 08:53
Show Gist options
  • Save ed-codes/70838556834415f5567bee49b42b6b1d to your computer and use it in GitHub Desktop.
Save ed-codes/70838556834415f5567bee49b42b6b1d to your computer and use it in GitHub Desktop.
var outboundClick = document.getElementById('js-outboundClick');
outboundClick.addEventListener('click', function(event){
event.preventDefault();
ga('send', 'event', 'Countrypopup', 'click', {
hitCallback: function() {
console.log('event fired');
// window.location.href="eteswimwear.com.au"
}
});
});
// Can also use onclick="ga('send','event','Countrypopup','click')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment