Cross-device tracking

Tapstream enables you to track a user session that starts on one device and continues on another. This is most useful for tracking user sessions that start on a desktop device, and continue in to an app install on a mobile device.

If your website has a flow that allows visitors to send a link to your app, via email or SMS, to their mobile device, you can use Tapstream's cross-device tracking by sending a specially-crafted link to your users' phone or table.

Implementing this will allow you to measure traffic referred to your desktop website in terms of real app user acquisitions.

Requirements

  • Tapstream JavaScript: Your site must have the Tapstream JavaScript installed.
  • Custom domain: Your Tapstream account must have a custom domain configured for campaign links, and the custom domain CNAME must be on the same domain as the site hosting the Tapstream JavaScript.
  • Send to mobile: Your site must have a mechanism for desktop visitors to send a link to your app to their mobile.

Implementation on your site

Add a hidden input to the form that sends your app link to your user's mobile device. This hidden input's value should be submitted and saved on your server, alongside your visitors' email or phone number, for later use.

<input type="hidden" id="tapstream-session" />

Add the following line inside your Tapstream JavaScript, above the first line that contains trackPage or fireHit. Make sure the value of setSessionFormFieldID matches the ID of the <input> tag, above.

_tsq.push(["setSessionFormFieldId", "tapstream-session"]);

The Tapstream JavaScript will change the value of the hidden <input> with a UUID that corresponds to the visitor's Tapstream session.

Sending the link to your customer

Instead of sending a naked app store link to your visitors' mobile device, send them a Tapstream campaign link. Configure your Tapstream campaign link to redirect to your App Store link. Remember that the campaign link you send must be on a CNAME that matches your desktop website's domain - so if your desktop site was example.com, your campaign link should look like ads.example.com/some-campaign/.

When sending the Tapstream campaign link to your visitors, you need to append some parameters.

Parameters:

  • __tsid: The Tapstream session UUID you collected from the hidden <input>
  • __tsid_override: Tells Tapstream to accept the UUID on the query string as the session ID. Should always be set to 1.

So if your Tapstream campaign link was http://ads.example.com/xdevice/, and your visitor had Tapstream session ID 6623b9d4-1614-4b85-be3c-2bf58a1a9a11, you would send the following link to the visitor's mobile device:

http://ads.example.com/xdevice/?__tsid=6623b9d4-1614-4b85-be3c-2bf58a1a9a11&__tsid_override=1

When the visitor clicks this link on their device, their mobile session - including any app events triggered by them installing your app - will be appended to their desktop session.