mParticle Post-install Deeplinking Guide on
Android
iOS

mParticle Post-install Deeplinking Guide

This guide will enable you to support Button's Mobile Web Publishers via mParticle. In this guide, we'll:

  1. Configure Button Links
  2. Configure Universal Links
  3. Handle Post-install Deeplinks

Configure Button Links

In the Button Dashboard, navigate to "Merchant" > "Apps" & click on the App you want to configure a Button Links domain for. Once on the App details page, click on the "Add a Button Links Domain" button in the "Button Links Domains" section. Simply fill out the details in the popup modal to complete the configuration.

Configure Universal Links

To support App Links for the Button domain (to stop any browser redirecting) you need to add intent filters for the http and https scheme for the Button subdomain (yourdomain.bttn.io) you registered. If you already registered an intent filter for your domain, you can simply add another to the same activity declaration.

We support verified web associated App Links so make sure to add the autoVerify="true" attribute to your intent filter. Note: this support is part of Android Marshmallow (6.0), so you'll also need to build against this target Button Merchant Library level.

<activity name=".MainActivity">
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW"/>
                <data android:scheme="https"/>
                <data android:host="yourdomain.bttn.io"/>
                <data android:pathPattern=".*"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
            </intent-filter>
...
</activity>

Button hosts the Digital Asset Links JSON file for your bttn.io subdomain. You can add your package name and sha256 certificate fingerprints to your app configuration in the Button dashboard.

Web Links

Use the following command to generate the fingerprint via the Java keytool:

keytool -list -printcert -jarfile  <APK_FILE>  | grep SHA256

Now, your link should open your app without ever opening your browser when the app is installed. Note: by supporting web associated app links you will prevent the Intent Chooser when opening the URL and your app will open automatically.

Enable Post-install Deeplinking

Adding the ButtonKit automatically enables support for Post-install Deeplinking. For full instructions on how to add the ButtonKit, please reference our mParticle Integration Guide here.