Collecting data from Webhook
Follow this guide to collect data using a webhook and preview the data.
Introduction
Use the Webhook connector to collect data from apps that allow you to use a webhook, such as Google Ad Lead Forms. The data collected by the Webhook datastream is passively received. This means you cannot collect the data manually. Instead, you select the events on which to collect data. For more information, see Advanced Webhook tips.
Prerequisites
Before you complete the procedure in this guide, perform all of the following actions:
-
Ensure you can log in to the app from which you want to collect data.
Connecting to Webhook
Adding a Webhook datastream
To add a Webhook datastream, follow these steps:
-
Go to the Datastreams page.
-
In the top right corner, click + Create datastream.
-
Search for and click Webhook.
-
Click Next.
-
(Optional) Rename your datastream.
-
From Webhook URL, copy the URL.
-
Log in to the app from which you want to collect data, and then paste the Webhook URL into the corresponding field. Adverity can receive data from any app that allows you to enter a webhook URL.
-
In Provider, select the data source from which the data is collected.
-
In Data extraction, define the data you want to include in the data extract.
To include only a part of the JSON object received from the data source in the data extract, select the Define JSON Path option and specify the path to your data in JSON Path. If you enter a JSON path, only the data specified by the JSON path is included in the data extract, and all other data in the JSON object is ignored.
For example, if the JSON object received from the data source is as follows:
{ "name": "Test event", "data": { "id": 1, "name": "John Doe", "by": "John Doe", "at": "2023-05-02T07:13:03.703Z" }, "user": { "email": "John@Doe.com" }, "ts": 1683011583703 }
the following JSON Path
$.data
will create such data extract -
(Optional) For the Google Ads Lead Form provider, in Key, enter the key to verify the data collection. You can find the key in the configuration of the app. If you cannot find the key, leave this field empty.
The key adds additional security to the connector. If you add the key to both the app and the Key field in the configuration, Adverity can compare the keys to ensure the data is coming from the correct source.
For more information see the Google documentation.
-
For the Narvar provider, fill in the following fields:
-
In Level, select the level on which you want to collect data.
-
In Narvar key, enter your Narvar key to verify the data collection.
-
-
Click Next.
Choosing where to load your data
To choose where to load your data, follow these steps:
-
To assign destinations to your datastream, select their checkboxes. For more information on destinations and their configuration settings, see Loading data into destinations.
-
Click Next.
Collecting data from webhook
Data is passively received in the form of events. These events are stored in the Events section of that datastream. To collect data with the Webhook datastream, select the events on which to collect data. For more information, see Advanced Webhook tips.
Previewing data collected from Webhook
The fetch collects data from Webhook which takes some time. The Overview page of the newly created datastream is now displayed. To preview the collected data, follow these steps:
-
In the All tasks tab, find the task at the top of the list, and click Show extracts.
-
Click the top hyperlink.
-
The data extract is displayed in a table containing the data that you have fetched.
What's next?
-
Apply Data Mapping to your collected data to harmonize data collected from different sources in Adverity.
-
Transform your data to meet your needs by creating and applying enrichments to your datastream.
-
Load your data into Explore & Present to visualize your data in Adverity
-
Load your data into an external destination of your choice
Advanced Webhook tips
Webhook events
The Webhook datastream passively receives data in the form of events. These events are stored in an events page. The Webhook events page displays the following information:
-
The ID of an event. This is displayed as a hyperlink. Click on the ID hyperlink to view more data of the event.
-
If an event has been fetched or not.
-
The time when the event was fetched.
Viewing Webhook events
To view Webhook events, follow these steps:
-
Go to the Datastreams page.
-
In the top right corner of the page, click More .
-
Click Events.
Collecting Webhook event data
To collect event data from Webhook, follow these steps:
-
In the Events page, select the checkboxes of the events for which you want to collect data.
-
Click Fetch selected events.
As a result, you are navigated back to the datastream overview page where you can view the progress of the data collection for the selected events.
The events can also be fetched automatically using the scheduling option. For more information, see Manual and scheduled fetches.
Viewing event details
To view the details of an event, follow these steps:
-
In the Events page, find the event to view in more detail.
-
Click on the number displayed as a hyperlink in the ID column.
As a result, you are navigated to a separate page that displays the following information:
-
Date displays the exact date on which that event was received.
-
Payload displays the content of the event in JSON format.