Modified on: Thu, Apr 12, 2018 at 5:04 AM
Branch’s webhook system allows you to receive install and down funnel event data from us as it occurs, for install attribution or conversion funnels in your own database. Learn how to set up, test and debug issues related to it.
How To Set Up
1. Dashboard Setup - Open the Webhooks page on the Branch dashboard and click + Add New Webhook. Be sure to enable Live mode: Branch doesn’t send webhooks in Test mode.
2. Configure webhook settings -
a. Send a webhook to: Enter the URL where you would like the events to be sent. This URL can be written with Freemarker syntax to dynamically populate parameters and execute simple, logical expressions. Note that Branch does not support the full list of Freemarker expressions due to security restrictions. Here is a list of blocked expressions:
"<#import>", "<#visit>", "<#include>", "?eval", "<#recurse>", "<#setting>", "<#macro>", "<#function>", "<#nested>", "<#return>", "<#list>"
b. Configure event trigger using a GET/POST: Events can be sent either via POST or GET. POST events will be created with a default POST body. Sample POST body below in section 3(a).
c. Users trigger event: When the selected event occurs, a webhook will fire: install, open, click, and other custom events. For an exhaustive list of events and more detailed definitions of each event, please see the Event Ontology Data Schema.
d. For filtering options (only events that pass the filter criteria will be sent), please refer to our docs here.
3. Data formatting - Branch’s powerful People-Based Attribution ensures that your metadata is consistently located across all events by following a set of data format called Event Ontology Data Schema. This consistent schema makes it easy to replicate Branch dashboards in your internal warehouse and compare large sets of data for different events.
a. The POST body for all webhooks follows the same structure. Here is a sample POST body:
See how to write POST body syntax with data for an attributed open event here.
b. Advanced filtering: section 2(d) points to the documentation where we cover what basic filters do, and how to set them. Branch supports more advanced filtering which allows customers to set filters based on almost any event metadata. Find out more here.
c. Templating your Postback URL: If you'd like to template your postback URL, you’ll likely need to create one of our templated Postback URLs alongside the aforementioned filters. These work very similarly to filters but use Freemarker syntax. Follow the instructions here.
4. Testing with Requestb.in - To test whether your webhook is configured correctly, you can use requestb.in. RequestBin gives you a URL that accepts events for 24 hours and allows you to see exactly what Branch is sending. Instruction can be found here. When you have finished testing, please archive your Requestbin webhook: Requestbins only last for 24 hours and return errors once they expire.
Why is my webhook not firing?
Is Live Mode enabled? (we don't send webhooks in test mode. Please refer to Step 1)
Is base Postback URL set (refer to Step 2(a))?
Is Event trigger configured (refer to Step 2(b))?
Are template postback key parameters formatted correctly? (refer to 3(c))?
Are you using any blocked Free Marker Expressions? (list of blocked expressions)
Did you test with RequestBin and see 200 response codes with data visible?
As the last step, trigger your events and ensure they appear on Liveview. If you still experience issues, please reach out to us at email@example.com with your Branch key and detailed steps to reproduce your issue.
Caveats / Tips
Data Feeds is a premium solution - the Webhooks are included in Branch’s Data Feeds offering, which can be purchased according to Branch’s pricing schedule, and is available at no additional charge to customers who are on MAU plans for Journeys, Deep Linked Email, or Universal Ads. Without Data Feeds, you can still export Branch data in CSV form directly from the Branch dashboard via Sources or CSV Exports. If you are looking for legacy webhooks, please see these docs.
To request authentication headers for your webhooks, please contact firstname.lastname@example.org.
If you are looking for postback integrations for ad networks, please visit our Universal Ads documentation. For pre-configured integrations into popular analytics tools, please visit our Data Integrations documentation.
Did you find it helpful?Send feedback