Skip to content

Instantly share code, notes, and snippets.

@chandlervdw
Last active May 31, 2023 18:26
Show Gist options
  • Save chandlervdw/e6d8f2e91c154070314946adddc74d10 to your computer and use it in GitHub Desktop.
Save chandlervdw/e6d8f2e91c154070314946adddc74d10 to your computer and use it in GitHub Desktop.
Custom examples for the JS SDK Playground
[
{
"method": "identify",
"title": "Identify (Chandler)",
"arg1": "1234-asdf-1234-asdf-1234-asdf",
"payload":
{
"firstName": "Chandler",
"lastName": "Van De Water",
"favorites":
{
"candy":
[
"Sour Patch Kids",
"Reese's"
],
"movies":
[
"Home Alone 2: Lost In New York",
"Maverick",
"Back To The Future: Part II"
]
}
}
},
{
"method": "page",
"title": "Page",
"arg1": "Cart",
"arg2": "Cart Viewed",
"payload":
{
"path": "/candy/1",
"referrer": "https://www.google.com/search?q=best+candy",
"search": "what are some yummy candies",
"title": "The best, most yummiest candies",
"url": "https://www.bestestcandies.biz/candy/1"
}
},
{
"method": "track",
"title": "Track",
"arg1": "Purchase",
"payload":
{
"cart":
[
"Sour Patch Kids",
"Nerds Gummy Clusters",
"Sour Gummy Worms"
]
}
},
{
"method": "track",
"title": "Track Calories",
"arg1": "Calories Eaten",
"payload":
{
"dinner": {
"Sour Patch Kids": 250,
"Nerds Gummy Clusters": 400,
"Sour Gummy Worms": 500
},
"late night": {
"Beer": 600
}
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment