Webhooks

What are webhooks, why you need them and how to use them.

What are webhooks?

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?

In AnyTrack case, webhooks are used to send conversion data to other marketing applications such as Drip or Active Campaign.

Before we dive into some use cases, let's see first what is a webhook and what kind of data it can carry.

The anatomy of a webhook

tl:dr : Head to the tutorial to see how it's done.

The webhook is mostly 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 trigger the webhook, and send the associated data payload.

The data payload

The data sent along with the URL, either as a JSON or in query strings.

if you look closely at the data, you will see familiar faces such as utm_source, utm_medium etc...

[
{
"eventId": "tv6Xth59luBOhkdaSK0Nql",
"timestamp": 1576179099,
"timeISO": "2019-12-12T19:31:39.045Z",
"assetId": "UEyTy8VUQX7L",
"type": "formSubmit",
"click": {
"clickId": "tv6Xth59luBOhkdaSK0Nql",
"timestamp": 1576179099,
"timeISO": "2019-12-12T19:31:39.045Z",
"type": "formSubmit",
"linkId": "element-387",
"linkUrl": "https://d.fastcdn.co/submissions",
"linkLabel": "custom-2"
},
"visit": {
"source": "direct",
"attributionLocation": "https://www.tracking.school/tools",
"location": "https://www.tracking.school/tools?utm_source=twitter&utm_medium=social&utm_content=webhook&utm_campaign=documentation&utm_term=what%20are%20webhooks",
"locationParams": {
"utm_source": "twitter",
"utm_medium": "social",
"utm_content": "webhook",
"utm_campaign": "documentation",
"utm_term": "what are webhooks"
},
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
}
}
]

What happens when Integromat receives this data?

Integromat is connected with hundreds of applications used everyday by marketers, sales, accountants, developers and professionals that want to automate certain tasks and don't want to hire a developer to build a workflow that connects their apps through an API.

The complexity of getting the data out of an application and into an other one, is simplified by Integromat since, when you have the data in Integromat, you simply have to select the application you want to send the data to and map the data you received in the webhook with fields available in the destination app.

Some definitions:

  1. Scenario: A scenario is a series of tasks you can set up to run automatically. A scenario starts with a Trigger and is generally followed by one or many actions.

  2. Trigger: The trigger is what will initiate the scenario to run and is the initial data receiving point.

  3. Action: The action is what will define the what you want to do with the data and to which application you want to send it.

  4. Tools: Integromat has a set of tools that you can use to manipulate, store, filter the data received in the trigger.

In the illustration below, you can see the webhook trigger and a choice of application where you want to send the data.

Send Anytrack conversion data to Google Sheets

This is a very simple use case but it illustrates very accurately what you can do with the data sent by AnyTrack webhook.

Before you begin make sure you have:

  1. An Integromat account - If you don't have one, you can open one here

  2. A Google Sheet account

  3. An AnyTrack account with an active Asset (property)

Watch the webhook by AnyTrack tutorial

Webhook providers

If you know other providers, do not hesitate to recommend them here.