Last active
December 14, 2015 09:38
-
-
Save padicode/5066547 to your computer and use it in GitHub Desktop.
JavaScript hooks for PadiAct actions
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
<script type="text/javascript"> | |
window.nrlskOnEvent = function(padiact) | |
{ | |
if (padiact.type=='open') | |
{ | |
// the code that needs to run when the PadiAct pop-up is displayed goes here | |
// example: | |
console.log ('PadiAct Showed Up'); | |
// available vars: | |
// padiact.id (padiact campaign ID) | |
// padiact.name (padiact campaign name) | |
} | |
if (padiact.type=='subscribe') | |
{ | |
// here should go the code that needs to run when the PadiAct pop-up is displayed | |
// the email address of the subscriber is available and url encoded: e.g. user%40gmail.com | |
// example: | |
console.log (padiact.email+' subscribed through PadiAct'); | |
// available vars: | |
// padiact.email (url encoded email of person that subscribed) | |
// padiact.id (padiact campaign ID) | |
// padiact.name (padiact campaign name) | |
} | |
if (padiact.type=='close') | |
{ | |
// here should go the code that needs to run when the PadiAct pop-up is closed (without subscribing) | |
// example: | |
console.log ('PadiAct Window Closed'); | |
// available vars: | |
// padiact.id (padiact campaign ID) | |
// padiact.name (padiact campaign name) | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment