Skip to content

Instantly share code, notes, and snippets.

@thomasgriffin
Last active May 7, 2020 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thomasgriffin/0b666111c977977a3dd3 to your computer and use it in GitHub Desktop.
Save thomasgriffin/0b666111c977977a3dd3 to your computer and use it in GitHub Desktop.
OptinMonster Dynamic Text Replacement API - setCustomVariable
<script type="text/javascript">
var OptinMonsterCustomVariables = function(app) {
/**
* API method for setting a custom variable. Must be accessed via the app object.
*
* @param string $key The custom variable key to set.
* @param string $value The custom variable value to set for the key.
* @return null
*/
app.setCustomVariable('foo', 'bar');
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment