Skip to content

Instantly share code, notes, and snippets.

@marinhero
Created February 4, 2020 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marinhero/bd472d707090cfcd6ce2f10c33c24b9d to your computer and use it in GitHub Desktop.
Save marinhero/bd472d707090cfcd6ce2f10c33c24b9d to your computer and use it in GitHub Desktop.
An example on how to set events inside the Wootric SDK to use targeted sampling
// You define a global variable to track your events
my_global_event_name = 'loaded_website';
// You define your WootricSettings variable at the beginning of the code
wootricSettings = {
account_token: 'NPS-YOURTOKEN',
email: 'user@example.com',
created_at: 1528416000,
properties: {
favorite_color: 'blue'
},
event_name: my_event
};
// You call Wootric whenever you want to check if the event you set might be eligible for a surve
wootric('run');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment