Branch
  • 20 Feb 2025
  • Dark
    Light

Branch

  • Dark
    Light

Article summary

For information from Branch, please see here.

Features and Limitations

  • Postback templates are global by default but can be customised within the integration dashboard

  • Attribution is based on last click and attribution windows can be amended per Ad Partner

  • Commission Groups can be setup dynamically or with a breakdown

  • Order reference and sale amount are available in the SDK by default

  • Deeplinking to specific pages is supported via canonical URL parameter

  • App to app deeplinking on iOS requires an additional parameter uri_redirect_mode that forces the opening of the app

  • Awin Merchant ID can be passed back in branch tracking URL via awin_merchant_id parameter. It has priority over the Merchant ID configured in the dashboard)

Integrating Awin Tracking

Integrating Branch

1. Advertiser to integrate SDK

2. Dynamic commission group or commission breakdown can be integrated within the SDK

let event = BranchEvent.standardEvent(.purchase)
event.cg = "NEW:34.00“

Parts parameter within the postback should be changed accordingly to &parts=${ (event_data.cg)!}

4. Advertiser to enable Ad Partner settings for the network on the integration dashboard

5. Populate Account ID with the Awin Merchant ID in Account Settings

  1. Set metrics in Attribution Window:

    - Click to install (default is 7 days)

    - Click to conversion event (should match the cookie length of the program on Awin)

  2. Enable postbacks for Install and Purchase events

DO NOT enable it for All Events as it will send the postbacks to all networks not just Awin)

  1. Customise the purchase event in Postback Config

  2. Create tracking link

Install postback

https://www.awin1.com/sread.php?tt=ss&tv=2&type=ai&merchant=${(ad_network.credentials.awin_advertiser_id)!}
&amount=1&ref=${(timestamp)!}&parts=INSTALL:1&testmode=0&cks=${(last_attributed_touch_data.~click_id)!}
&p1=${(user_data.os)!}

Purchase postback

https://www.awin1.com/sread.php?tt=ss&tv=2&type=ap&merchant=${(ad_network.credentials.awin_advertiser_id)!}
&amount=${(event_data.revenue)!}&ref=${(event_data.transaction_id)!}&parts=INAPP-SALE:${(event_data.revenue)!}
&cks=${ (last_attributed_touch_data.~click_id)!}&cr=${(event_data.currency)! }&p1=${(user_data.os)!}

About deeplinking

AWIN supports a URI scheme but doesn’t support the handling of iOS Universal links and Android app link methods of deep linking. This is due to the link wrapping. It applies to any link used within AWIN. To deep link with Branch tracking link via AWIN, you will need to setup the Branch tracking link URL with a URI scheme. Preferably, your app developer should configure the SDK to support HTTP URL as a deep link value. For iOS apps, use the uri_redirect_mode=1 parameter on the Branch tracking link URL to activate the deep link URI scheme.

If the URI scheme is filled in the deeplink_path parameter, the user will consistently be directed to the static page within the app. However, in cases where the app isn't installed, Safari will display an invalid address error. This method does not support dynamic deep linking. Alternatively, if the app developer implements handling for HTTP URLs by converting them into URI schemes that the app can understand (e.g., making them app-readable product destinations), users will be directed to the relevant product page within the app. Notably, this approach avoids displaying an invalid address error in Safari when the app is not installed.

Attribution

Based on last click and can amend the attribution window per Ad partner.

  • Click to Install (Default period is 7 days)

  • Click to Purchase (Time period should match Awin cookie length – generally 30 days)

  • DO NOT ENABLE ALL events tick box in the postback configuration dashboard. This will ensure postbacks are only received when the event was attributed to Awin.

Generating a Branch Ad Tracking Link

Select Ad format

From within the Branch dashboard, click the Create button on the upper right-hand corner.

A Create Ad Link modal will appear. Select one of the following ad formats:

App Only

  • App Install or Engagement

Cross-Platform Display

  • Create Display Link

  • Create Search Link

Difference Between Format Types

For App Install or App Engagement campaigns you'll want to select the "App Only" format. For Search or Display campaigns where the user should go to web if they don't have the app, then you should select Cross-Platform Search or Cross-Platform Display. Product Links are for shopping or dynamic re-marketing campaigns.

Defining Ad Link Domain & Ad Partner

https://awinexample.app.link/?%243p=a_awin&~click_id=!!!awc!!!&$uri_redirect_mode=1&~campaign=!!!companyname!!!&$fallback_url=!!!redirectURL

Tracking link URL can be enabled as a Mobile Prefix for Mobile and non-Mobile traffic

Parameters required within the Branch Tracking Link:

Parameter

Requirements

%243p=a_awin

Network identifier to attribute the event to Awin (mandatory)

~click_id=!!!awc!!!

Awin click ID to be populated with awc (mandatory)

$uri_redirect_mode=1

It will force the opening of the app on iOS (mandatory)

~campaign=!!!companyname!!!

For reporting to pass the publisher name (mandatory)

$fallback_url=!!!redirectURL!!!

Fallback to a specific URL when the app is not installed and redirect users to a different destination from the app store (mandatory)

$canonical_url=!!!merchantURLcm!!!

Allow to deeplink to a specific page within the app. URL must be encoded

$deeplink_path

Set the deep link path for all platforms - so you don't have to enable it by platform. When the Branch SDK receives a link with this parameter set, it will automatically load the custom URI path contained within


Testing your App Tracking

Once you’ve completed the installation of your app tracking, please get in touch with your assigned Awin technical point of contact for more information on how to test your tracking.

For a more general overview of the testing process, please review our Testing your Integration article.


Was this article helpful?

What's Next