Visit our new documentation site! This documentation page is no longer updated.

Raw-Data Access to Branch Metrics Events

Branch Metrics is linking infrastructure for today’s top brands. If you use Branch Metrics to manage your mobile advertising campaigns, you can now leverage the Branch Metrics to Treasure Data webhook integration to bring in your mobile data into Treasure Data.

Every time these events occur in mobile devices, it will be notified to Branch Metrics, and then to Treasure Data. Treasure Data stores all historical raw events for your analysis.

Table of Contents

Generate Treasure Data Write-only API Key

Treasure Data requires Write-only API Key for authentication when you import data.

After clicking the “My Profile” which is located at bottom left of the screen at, click API Key tab and generate “Write-only” API keys.

Postback setup within Branch Metrics Console

Set up webhook configuration from Branch Metrics. In this way, every time events get captured within Branch Metrics, the events are forwarded to Treasure Data in real-time.

First, open Webhooks page and click Add a new webhook.

Then, use the following URL for the endpoint. This leverages our REST Import API endpoint with GET method.<database_name>/<table_name>?td_write_key=<TD_API_WRITE_KEY>&event_name={{}}&clickId={{session.link_click.query.clickId}}&hardware_id={{device.hardware_id}}&event_date={{}}&link_id={{click.link_data.~id}}&link_campaign={{click.link_data.~campaign}}&link_channel={{click.link_data.~channe}}&link_feature={{click.link_data.~feature}}&link_stage={{click.link_data.~stage}}
  • TD_API_WRITE_KEY: Treasure Data’s write key. You can get the write key from your Treasure Data console(see Get the API Key). Do not to forget URL encodiing.
  • database_name: Database name in Treasure Data you want to send data.
  • table_name: Table name in Treasure Data you want to send data.

The example URL is like following.{{}}clickId={{session.link_click.query.clickId}}&hardware_id={{device.hardware_id}}&event_date={{}}&link_id={{click.link_data.~id}}&link_campaign={{click.link_data.~campaign}}&link_channel={{click.link_data.~channe}}&&link_feature={{click.link_data.~feature}}&&link_stage={{click.link_data.~stage}}

There’s a LOT more keys available on Branch Metrics. Check the documentation here.


Now send a couple of events. Then, for each configure webhook, you can see Recent Records section. It will take 3-5 minutes to appear events on Treasure Data.

Further Readings

Contact us for details.

Last modified: Feb 27 2018 21:59:05 UTC

If this article is incorrect or outdated, or omits critical information, let us know. For all other issues, access our support channels.