Skip to content

Instantly share code, notes, and snippets.

@jtsternberg
Forked from thomasgriffin/getcustomvariables.js
Last active May 7, 2020 21:53
Show Gist options
  • Save jtsternberg/aa7552dec855f77b06efe9640821f177 to your computer and use it in GitHub Desktop.
Save jtsternberg/aa7552dec855f77b06efe9640821f177 to your computer and use it in GitHub Desktop.
OptinMonster Dynamic Text Replacement API - getCustomVariables
<script type="text/javascript">
document.addEventListener('om.Dtr.init', function(event) {
/**
* API method for retrieving all custom variables. Must be accessed via the Dtr object.
*
* @return object A JavaScript object with key/value pairs for custom variables.
*/
event.detail.Dtr.getCustomVariables();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment