-
-
Save jtsternberg/71a6148262f63b5809c5bc3415279617 to your computer and use it in GitHub Desktop.
OptinMonster Dynamic Text Replacement API - hasCustomVariable
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"> | |
document.addEventListener('om.Dtr.init', function(event) { | |
/** | |
* API method for checking if a custom variable has been registered. | |
* Must be accessed via the Dtr object. | |
* | |
* @param string $key The custom variable key to check. | |
* @return bool True if the custom variable exists, false otherwise. | |
*/ | |
event.detail.Dtr.hasCustomVariable('foo'); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment