How can I attribute events through Web SDK to app install in Branch.io?

120 views Asked by At

For context, I have a PWA which is published in Play and App store. The app is running in web so Android/IOS SDK can't be used for events.

What I would like to happen:

  1. User clicks on an ad and user is taken to Play/App store.
  2. User installs the app and Android/IOS SDK handles the install event and it's attributed to the ad.
  3. User does something in the web app (PWA) which triggers an event. Event would be attributed to the ad.

I read about developer identity and I managed to achieve my goal for one user but the same method failed for another and I'm not following the logic.

The method:

  1. Inside mobile SDK, I set developer identity (Android: Branch.getInstance().setIdentity(identity);)
  2. Then I passed the identity to the PWA by adding it as query parameter to the PWA launch URI
  3. I set the same developer identity inside the Web SDK (branch.setIdentity(identity))

I did verify that both users had correct developer_identity in the install event and custom events that were sent from the Web SDK.

I don't understand why those custom events were attributed to the ad for the other user but not the other.

Do I have wrong approach or am I just missing something?

1

There are 1 answers

0
Pree On

If a user clicks on an ad link (or any other Branch link) that leads to the mobile web, and then immediately installs or opens the app from a Journey, this will be attributed to the ad link (or other original link).

This can be changed by setting make_new_link to true in the web SDK. Docs here: https://dev.branch.io/marketing-channels/journeys/advanced/#preserve-or-discard-referring-link-data.

Some attribution scenarios:

  • If the user ends up on mobile web and immediately installs or opens the app from a Journeys, this will be attributed to the ad link

  • If the user ends up on mobile web, leaves, and then downloads within the attribution window time frame, this will be attributed to the ad link

  • If the user ends up on mobile web, does not immediately click the Journey, browses, or comes back and downloads from the Journey at a later time, this will be attributed to the Journey