Skip to content

Instantly share code, notes, and snippets.

@jtsternberg
Forked from thomasgriffin/hascustomvariables.js
Last active May 7, 2020 21:53
Show Gist options
  • Save jtsternberg/cef78148fb2ee16568b9212b5e0d4406 to your computer and use it in GitHub Desktop.
Save jtsternberg/cef78148fb2ee16568b9212b5e0d4406 to your computer and use it in GitHub Desktop.
OptinMonster Dynamic Text Replacement API - hasCustomVariables
<script type="text/javascript">
document.addEventListener('om.Dtr.init', function(event) {
/**
* API method for checking whether there are any custom variables set.
* Must be accessed via the Dtr object.
*
* @return bool True if any custom variable has been registered, false otherwise.
*/
event.detail.Dtr.hasCustomVariables();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment