Webhooks

What are webhooks, why you need them and how to use them to leverage your conversion data and automate your marketing.

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?

You need webhooks because 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.

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 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.

A popular webhook provider is Integromat. In our case, they are the receiving server.

The webhook 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 webhook data 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.

When creating your webhook, you should first hit the "test" button in order to send all standard parameters to the webhook provider end point.

[
    {
        "assetId": "TestAssetId",
        "clientId": "TestClientId",
        "externalClientIds": {
            "googleAnalytics": "99532458.1592848149"
        },
        "clickId": "CLICK_ID",
        "externalClickId": "test123",
        "eventName": "Purchase",
        "eventTime": "2020-10-14T12:15:37.021Z",
        "eventTimestamp": 1602677737,
        "eventValue": 3.77,
        "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",
        "mainAttribution": {
            "time": "2020-10-14T12:08:37.021Z",
            "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": "2020-10-14T12:08:37.021Z",
                "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": ""
            }
        ]
    }
]

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

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

Integromat is a great Zapier alternative
Zapier
Automate.io is a great Zapier alternative

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

Last updated

Logo

Copyright Anytrack 2019