Skip to main content

Branch Integration with Swaarm

How to set up the attribution link and postback URLs for Branch integration with Swaarm.

Overview

This article covers the attribution link template and postback URL setup for integrating Branch with Swaarm.

The templates below are suggested starting points — you can add or remove parameters based on your requirements.

ℹ️


Attribution Link

Complete attribution link with Swaarm macros:

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

Postback URLs

Branch fires the install through a global postback and any post-install events through an additional event postback.

⚠️ Replace {yournetwork_int} with your own AppsFlyer Partner ID.

Install postback (both OS):

https://track.{yournetwork}.swaarm-clients.com/postback?click_id=${(last_attributed_touch_data.~click_id)!}&gaid=${(user_data.aaid)!}&idfa=${(user_data.idfa)!}&country=${(user_data.geo_country_code)!}&sale_amount=${(event_data.revenue_in_usd)!}

In-app event postback (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)!}&sale_amount=${(event_data.revenue_in_usd)!}

In-App Event Setup in Swaarm

For Swaarm to track in-app events from Branch, you need to add Branch event name to the offer's event setting in Adv. EventType ID field:

  1. Go to the OfferEdit → Events

  2. On each event, set the Adv. EventType ID to match the Branch event name exactly (e.g. if the event is called OPEN in Branch, set Adv. EventType ID to OPEN)

Did this answer your question?