Last active
July 15, 2019 22:19
-
-
Save ericakfranz/795d3e3f7277cc143ece8e9e1303f6ad to your computer and use it in GitHub Desktop.
MonsterLink then open URL in new tab
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 characters
<a href="https://app.monstercampaigns.com/c/CAMPAIGN_ID/" target="_blank" >MonsterLink</a> | |
<script type="text/javascript"> | |
document.addEventListener('om.Campaign.afterShow', function(event) { | |
if (event.detail.Campaign.id === "CAMPAIGN_ID") { | |
var redirectWindow = window.open('REDIRECT_URL', '_blank'); | |
jQuery.ajax({ | |
type: 'POST', | |
url: 'REDIRECT_URL', | |
success: function (data) { | |
redirectWindow.location; | |
} | |
}); | |
} | |
} ); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment