-
-
Save jtsternberg/6045a7e0b7e3ecd72cea1fb4b8ca3d5f to your computer and use it in GitHub Desktop.
OptinMonster Dynamic Text Replacement API - setCustomVariable
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 setting a custom variable. Must be accessed via the Dtr object. | |
* | |
* @param string $key The custom variable key to set. | |
* @param string $value The custom variable value to set for the key. | |
* @return null | |
*/ | |
event.detail.Dtr.setCustomVariable('foo', 'bar'); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment