Skip to content

Instantly share code, notes, and snippets.

@hijonathan
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save hijonathan/dca3e2f5a4d245efde25 to your computer and use it in GitHub Desktop.

Select an option

Save hijonathan/dca3e2f5a4d245efde25 to your computer and use it in GitHub Desktop.
Using AppcuesIdentity config object.
// Create a special global variable that the Appcues script will look for upon load.
// Admittedly, this should probably be called "AppcuesConfig".
window.AppcuesIdentity = window.AppcuesIdentity || {
appcuesId: 'foo',
userId: 1234,
userEmail: '[email protected]'
};
// Asynchronously load Appcues embed script.
asyncLoadAppcues().then(function() {
// Initialize.
Appcues.init();
// Optionally, call Appcues.identify() to pass more properties.
Appcues.identify({name: 'Tim', favorite_color: 'red'});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment