Last active
August 29, 2015 14:04
-
-
Save hijonathan/dca3e2f5a4d245efde25 to your computer and use it in GitHub Desktop.
Using AppcuesIdentity config object.
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
| // 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