Example Webhook Responses- Visitor Created, Account Created, Track Event
Below you will find example response bodies for our webhook types:
- Visitor Created
- Account Created
- Track Event Received
These examples have had all identifying info replaced. Thanks Todd Stoffer for putting this together!
Visitor Created
{
"app": {
"id": -323232,
"name": "test_application",
"platform": "web"
},
"accountId": "Webhook Account",
"subscription": {
"id": 4802463602049024,
"name": "test_application"
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36",
"event": "visitorCreated",
"properties": {
"browserName": "Chrome",
"browserVersion": "91.0.4472",
"sampleGroup": 17
},
"timestamp": 1626803875,
"visitorId": "Webhook Visitor",
"uniqueId": "1a2c20ed531bf920781d7f1449968b772840e36c"
}
Account Created
{
"app": {
"id": -323232,
"name": "test_application",
"platform": "web"
},
"accountId": "Webhook Account",
"subscription": {
"id": 4802463602049999,
"name": "test_application"
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36",
"event": "accountCreated",
"properties": {},
"timestamp": 1626803875,
"visitorId": "Webhook Visitor",
"uniqueId": "38993a6dd7ff256c0112528ca44b291255603647"
}
Track Event Received
{
"app": {
"id": -323232,
"name": "test_application",
"platform": "web"
},
"accountId": "Webhook Account",
"subscription": {
"id": 4802463602049999,
"name": "test_application"
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36",
"event": "trackEventReceived",
"properties": {
"eventProperties": {
"fromTier": "basic",
"toTier": "pro"
},
"name": "Account Upgraded",
"source": "web"
},
"timestamp": 1626804144,
"visitorId": "Webhook Visitor",
"uniqueId": "75c32838012a8311fba2b902857c2e848d98f457"
}
-
Is it possible to have agent metadata sent for the `accountCreated` and `visitorCreated` webhooks? I'm wondering if I wanted to auto-create users and accounts in another system could I get things like name, email, etc from these webhooks or would I have to call the account & visitor endpoints to get those details?
-
Taylor Clark, if there's a desire to have additional data included in the webhooks for account/visitor created, that would be a feature request.
You're correct that you'd have to use either the account/visitor API endpoints to get those details OR create a visitor/account report and use the report API endpoints.
Please sign in to leave a comment.
Comments
2 comments