
Webhooks are automated notifications sent by an application to a URL. Generally, the target URL is an API end-point that will be able to handle the data sent with the URL and record such information into a server for further processing.
Thanks to companies like Zapier and Integromat, working with webhook requires very little technical skills and allow to automate workflows between applications that you use every day.
Why do you need webhooks?
Sometimes you need to send or receive data from and to applications that are not directly integrated in AnyTrack. Webhooks can be used to send data from AnyTrack or to send data to AnyTrack.
Outgoing Webhook
When you want to send conversion data from AnyTrack to a third party application like Drip or ActiveCampaign so you can tie conversions with your subscribers.
Incoming Webhook
When an affiliate network or app is not integrated with AnyTrack and you want to send your conversion data from such app to AnyTrack.
The anatomy of a webhook
The webhook is composed of two elements. The URL which is provided by the receiving server and the data payload, which comes either as a json or as query strings.
The URL
The webhook URL below is provided by Integromat:
https://hook.integromat.com/j8s8l9y0odfxokmb9ino98jkj2ow6y0p
The Webhook URL is added to the settings of one of your property:
You can select which events you wish to send to the webhook and when enabled, each of those events will call the webhook, and send the associated data payload.
The Payload
The webhook payload is the data sent alongside the webhook URL. It is formatted as a JSON so that both Zapier and Integromat can parse it for further processing.
{
"assetId": "TestAssetId",
"clientId": "TestClientId",
"externalClientIds": {
"googleAnalytics": "99532458.1592848149"
},
"clickId": "CLICK_ID",
"externalClickId": "test123",
"eventName": "Purchase",
"eventTime": "2021-09-09T14:08:10.499Z",
"eventTimestamp": 1631196490,
"eventValue": 3.77,
"currency": "EUR",
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1",
"location": "https://example.com/catalog?category=123",
"brandName": "Test Brand Name",
"linkURL": "https://example.com/buy-now",
"linklabel": "cj-6",
"trackingGroupId": "cj",
"integrationId": "cj",
"transactionId": "TestTransactionId",
"transactionTax": 1.32,
"transactionShipping": 2.99,
"items": [
{
"id": "SKU-123",
"name": "iPhone 12 Pro",
"price": 5.99,
"quantity": 1
}, {
"id": "SKU-567",
"name": "iPhone 12 Mini",
"price": 2.99,
"quantity": 2
}
],
"traits": {
"email": "john.doe@gmail.com",
"firstName": "John",
"lastName": "Doe",
"phone": "+1 541 754 3010",
"birthdate": "1984-04-19",
"city": "New York",
"state": "NY",
"zipcode": 12345,
"country": "United States",
"countryCode": "US"
},
"mainAttribution": {
"time": "2021-09-09T14:01:10.499Z",
"page": "example.com/catalog",
"referrer": "https://google.com/",
"source": "google",
"medium": "cpc",
"campaign": "anytrack",
"term": "",
"content": "",
"creative": "",
"gclid": "test123",
"fbclid": "",
"tblci": "",
"ob_click_id": "",
"msclkid": "",
"atclid": "",
"params": {
"tblci": ""
},
"tbclid": ""
},
"attributions": [
{
"time": "2021-09-09T14:01:10.499Z",
"page": "example.com/catalog",
"referrer": "https://google.com/",
"source": "google",
"medium": "cpc",
"campaign": "anytrack",
"term": "",
"content": "",
"creative": "",
"gclid": "test123",
"fbclid": "",
"tblci": "",
"ob_click_id": "",
"msclkid": "",
"atclid": "",
"params": {
"tblci": ""
},
"tbclid": ""
}
]
}
When creating a webhook, you should first hit the "test" button in order to send all standard parameters to the end point.
Comments
0 comments
Please sign in to leave a comment.