Branch Metrics links 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, Branch Metrics is notified, and then to Treasure Data. Treasure Data stores all historical raw events for your analysis.

Continue to the following topics:

Generate Treasure Data Write-Only API Key

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

After selecting My Profile which is located at the bottom left of the screen of the TD Console, select the API Key tab, and generate Write-only API keys.

Postback Setup Within Branch Metrics Console

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

Open Webhooks page and select Add a new webhook.

Then, use the following URL for the endpoint. This leverages our REST Import API endpoint with GET method.

 https://in.treasuredata.com/postback/v3/event/<database_name>/<table_name>?td_write_key=<TD_API_WRITE_KEY>&event_name={{event.name}}&clickId={{session.link_click.query.clickId}}&hardware_id={{device.hardware_id}}&event_date={{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 TD Console (see Access Control Reference Your API Keys and IP Whitelist). 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 as follows.

http://in.treasuredata.com/postback/v3/event/branchio/click?td_write_key=321%1234567890abcdefghijklmnopqrstuvwxyz&event_name={{event.name}}clickId={{session.link_click.query.clickId}}&hardware_id={{device.hardware_id}}&event_date={{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:

Testing

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. You create a query in Treasure Data to track the events coming in.


Further Readings

Contact us for details.


  • No labels