# Deep Linking Standard

## DataLayer Standard

After reading the deeplink values from the framework you are using with your SDK, we created a JENTIS standard for passing this information to our system so that JENTIS standards can be applied.

<table><thead><tr><th width="140">Category</th><th width="80" data-type="checkbox">Mandatory</th><th width="236">Property</th><th>Description</th></tr></thead><tbody><tr><td>Link Identity</td><td>true</td><td>deeplink_url</td><td>the full raw deeplink URL (e.g. <code>myapp://product/123?ref=email</code>)</td></tr><tr><td>Link Identity</td><td>false</td><td>deeplink_scheme</td><td>the URI scheme (e.g. <code>myapp://</code>, <code>https://</code> for Universal Links)</td></tr><tr><td>Link Identity</td><td>false</td><td>deeplink_path</td><td>the path component (e.g. <code>/product/123</code>)</td></tr><tr><td>Source &#x26; Attribution</td><td>false</td><td>deeplink_source</td><td>where the link came from (e.g. email, push_notification, sms, qr_code, social)</td></tr><tr><td>Source &#x26; Attribution</td><td>false</td><td>deeplink_medium</td><td>marketing medium (maps well to UTM conventions)</td></tr><tr><td>Source &#x26; Attribution</td><td>false</td><td>deeplink_campaign</td><td>campaign name if applicable</td></tr><tr><td>Source &#x26; Attribution</td><td>false</td><td>deeplink_referrer</td><td>the app or domain that triggered the open</td></tr><tr><td>Context</td><td>false</td><td>deeplink_type</td><td><code>deferred</code> vs <code>direct</code> (deferred = user didn't have the app yet)</td></tr><tr><td>Context</td><td>false</td><td>deeplink_match_type</td><td>how it was resolved: <code>exact</code>, <code>fuzzy</code>, <code>none</code></td></tr><tr><td>Context</td><td>false</td><td>deeplink_target_screen</td><td>the screen/route the app navigated to (e.g. <code>ProductDetailScreen</code>)</td></tr><tr><td>Context</td><td>false</td><td>deeplink_fallback_triggered</td><td><code>true/false</code> if the fallback URL was used instead</td></tr></tbody></table>

Here is an example data layer command:

### iOS Implementation:

```
TrackingService.shared.push([
  "track": "deeplink_opened",
  "deeplink_url": "myapp://product/123",
  "deeplink_scheme": "myapp://",
  "deeplink_path": "/product/123",
  "deeplink_source": "push_notification",
  "deeplink_campaign": "spring_sale_2026",
  "deeplink_type": "direct",
  "deeplink_target_screen": "ProductDetailScreen",
  "deeplink_fallback_triggered": false
])

try await TrackingService.shared.submit()
```

### Android Implementation:

```
val data= listOf(
  mapOf(
    "track" to "deeplink_opened",
    "deeplink_url" to "myapp://product/123",
    "deeplink_scheme" to "myapp://",
    "deeplink_path" to "/product/123",
    "deeplink_source" to "push_notification",
    "deeplink_campaign" to "spring_sale_2026",
    "deeplink_type" to "direct",
    "deeplink_target_screen" to "ProductDetailScreen",
    "deeplink_fallback_triggered" to false
  )
)

JentisTrackService.getInstance().push(data)
JentisTrackService.getInstance().submit()
```

## Coding Example

It is very important, when choosing a technology, that it is able to read URL parameters so this information can be passed to the JENTIS DataLayer — for example, to include them in a pageview request.

But how can these parameters be read?

We have created a code example (Server-Side Variable) that demonstrates how to read URL parameters:

```javascript
async function app_install_referrer_gclid() {
    let oEvent;
    let propertyKey = "deeplink_url"; // property-key tracked from APP-SDK
    let urlParameterKey = "gclid"; // URL-Parameter to look for
    let propertyValue = "";

    for (let i = 0; i < this.package.documents.length; i++) {
        if (this.package.documents[i].documentType === "event") {
            oEvent = this.package.documents[i];
            break;
        }
    }

    if (typeof oEvent !== "undefined" &&
        typeof oEvent.property !== "undefined" &&
        typeof oEvent.property[propertyKey] !== "undefined") {
        propertyValue = oEvent.property[propertyKey];
    }

    if(propertyValue) {
      const params = new URLSearchParams(propertyValue);
      if (params.has(urlParameterKey)) {
        return params.get(urlParameterKey);
      }
    }
  
    return "";
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jentis.com/app-tracking-setup/ad-attribution/deep-linking-standard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
