Help & DocumentationSystem AdministrationDeployment & Configuration Deploying Metric InsightsDeploying Mobile Apps with support for Deep Links (links to the Metric Insights Mobile App)

Deploying Mobile Apps with support for Deep Links (links to the Metric Insights Mobile App)

This document describes the basic process for deploying a mobile app with support for Deep Links (e.g. a link is clicked in an email from Metric Insights, and the Metric Insights mobile app is opened rather than the web browser).

Note This cannot be done without a custom build from the Metric Insights Engineering Team.

Provide List of Supported Domains

In order for deep linking to work, the mobile app (iOS or Android) needs to know which domains to route to the Metric Insights app instead of a web browser.

This is done by including a list of Associated Domains, e.g:

  • metricinsights.company.com
  • metricinsights-qa.company.com
  • metricinsights-dev.company.com

This would support 3 separate metric insights environments (product, development and QA)

Associated Domains need to be applied both in the custom build prepared by Metric Insights, and in the customer's own Apple Developer Enterprise account:

Important You will need to provide the Metric Insights Engineering team with your list of Associated Domains for a custom build with Deep Linking to be prepared.

Define App ID on Metric Insights Server

To set the site association, go to https://<metric insights  domain>/apple-app-site-association (e.g. https://metricinsights.company.com//apple-app-site-association). It should prompt you to download a file. Proceed and open the file in a text editor.

You'll need to replace the X's in XXXXXXXXXX.com.metricinsights.mobile.ios with your own App ID:

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "XXXXXXXXXX.com.metricinsights.mobile.ios",
                "paths": [ "/deep_link*" ]
            }
        ]
    },
    "webcredentials": {
        "apps": [
            "XXXXXXXXXX.com.metricinsights.mobile.ios"
        ]
    }
}

Once the file has been edited, it needs to be uploaded to the server.

This information is provided for your understanding, but we recommend sticking to the system default ("deep_link") and not making any modifications.

There is a single system Config Variable, MOBILE_DEEP_LINKING_PREFIX that defines the prefix to place before the trailing URL, e.g. https://<domain>/<deep link prefix>/<remainingurl> or, expressed more clearly, https://metricinsights.company.com/deep_link/report/index/index/element/123/segment/456

MOBILE_DEEP_LINKING_PREFIX is set to deep_link by default and does not need to be changed.

All links in Bursts and other email distributions that include an Element will use this URL pattern.

Scope of objects that support Deep Linking

Deep linking will work for the following Element types:

  1. Reports (including Dimensions)
  2. Metrics (including Dimensions)
  3. External Reports (including Dimensions)

Technically, each Element supports the following URL pattern

  • https://<domain>/deep_link/report/index/index/element/<int value>/segment/<int value>
  • https://<domain>/deep_link/chart/index/index/element/<int value>/segment/<int value>
  • https://<domain>/deep_link/extreport/index/index/element/<int value>/segment/<int value>