Last active
January 27, 2016 18:01
-
-
Save ericakfranz/c11d6ff02142bf08a2b6 to your computer and use it in GitHub Desktop.
Redirect when a specific optin is closed using the OptinMonster event 'OptinMonsterOnClose'.
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
jQuery(document).ready(function($){ | |
function omRedirect() { | |
var url = "http://optinmonster.com"; | |
$(location).attr('href',url); | |
} | |
$(document).on('OptinMonsterOnClose', function(event, data, object){ | |
if(data.optin = 'YOUR_OPTIN_SLUG_HERE') { | |
omRedirect(); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment