Branch Integration with Swaarm

This article explains how the Tracking link Template & Postback URL should look like on Branch platform

Updated over a week ago

In this article, we are going to explain how the tracking URL template and the postback URL should look like for Branch integration.

To initiate this integration, you need to send the following:

  1. Attribution link template

  2. Postback URLs with Branch supported macros

Branch attribution link Template:

See below what the complete attribution link should look like after you have added additional Swaarm macros:

https://branchster.app.link/abcxyz?%243p=partner_id&%24aaid={device.ids.gaid}&%24idfa={device.ids.gaid}&~click_id={id}&~secondary_publisher={publisher.id}&parameter1={publisher.subId}&parameter2={YYY}&parameter3={ZZZ}

For the full list of Macros supported by Swaarm, click here

You can find the additional Attribution link parameters supported by Branch,

Swaarm recommended global Install and in-app event postbacks Creation:

Branch has the ability to fire the install through the global postback and any other post-install events through an additional event postback.

This is how the Global postback should look like after adding the Branch supported macros:

💡Important Note - The domain name "yournetwork" should be replaced with your own postback domain

Install postback for Android:
https://track.yournetwork.swaarm-clients.com/postback?click_id=${ (last_attributed_touch_data.~click_id)! }&gaid=${ (user_data.aaid)! }&idfa=${ (user_data.idfa)! }

Install postback for iOS:
https://track.yournetwork.swaarm-clients.com/postback?click_id=${ (last_attributed_touch_data.~click_id)! }&gaid=${ (user_data.aaid)! }&idfa=${ (user_data.idfa)! }

In-App event postback for both OS:
https://track.yournetwork.swaarm-clients.com/postback?event_id=${(name)!}&click_id=${ (last_attributed_touch_data.~click_id)! }&gaid=${ (user_data.aaid)! }&idfa=${ (user_data.idfa)! }&country=${ (user_data.geo_country_code)! }

To track the In-App event in Swaarm system, you need to insert the Branch event name in Swaarm event configuration page. Let's assume the event is called "OPEN" on Branch side, you need to insert the same event name in Adv. EventType ID section in Swaarm as follows,

There is another way of tracking events which also works but not recommended by Swaarm is tracking events based on Swaarm event ID, To track the In-App event in Swaarm system, you need to insert the Swaarm event type ID on the Branch postback configuration page.

This is how the event postback template looks with the Swaarm event ID,

https://track.yournetwork.swaarm-clients.com/postback?our_event_type_id=${(ad_network.goal_ids["${(name)!}"])!}&click_id=${ (last_attributed_touch_data.~click_id)! }&gaid=${ (user_data.aaid)! }&idfa=${ (user_data.idfa)! }&country=${ (user_data.geo_country_code)! }

These are suggested templates that you can use, but you can add or delete some parameters that are macros based on your company's requirements.

For the full list of Postback parameters supported by Swaarm, click here

You can find the additional Postback link macros supported by Branch, here

Did this answer your question?