Skip to content

Commit

Permalink
⏲️ Add timestamp to referrer data for deferred deeplinks
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMarquis committed Jun 11, 2024
1 parent 6761e3d commit 6f0cbad
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
14 changes: 12 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
| **[Intent scheme](intent-scheme.md)** | [Test][test-intent-scheme] | ✔️ | ✔️ | ✔️ | ✔️ ||
| **[App scheme](app-scheme.md)** | [Test][test-app-scheme] | ✔️ | ✔️ | ✔️ | ✔️ ||
| **[⚠️ Firebase Dynamic Links](firebase-dynamic-links.md)** | [Test][test-firebase-dynamic-links] | ✔️ ||| ✔️ | ✔️ |
| **[Play Store url](play-store-url.md)** | [Test][test-play-store-url] | ✔️ | ✔️ | ✔️ || ✔️ |
| **[Market scheme](market-scheme.md)** | [Test][test-market-scheme] | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| **[Play Store url](play-store-url.md)** | [Test][test-play-store-url]{ .timestamp-referrer } | ✔️ | ✔️ | ✔️ || ✔️ |
| **[Market scheme](market-scheme.md)** | [Test][test-market-scheme]{ .timestamp-referrer } | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |

<script type="text/javascript">
(function(){
[].forEach.call(document.querySelectorAll("a.timestamp-referrer"), function(a) {
let params = new URLSearchParams(a.search);
params.set("referrer", "my referrer data at " + Date.now());
a.search = params.toString();
});
})();
</script>

[test-web-url]: http://smarquis.fr/action?key=value#data
[test-app-links]: https://smarquis.fr/action?key=value#data
Expand Down
16 changes: 14 additions & 2 deletions docs/market-scheme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
!!! info "Documentation"
https://developer.android.com/distribute/marketing-tools/linking-to-google-play.html#UriSummary

[`market://details?id=fr.smarquis.applinks&url=link%3A%2F%2Fsmarquis.fr%2Faction%3Fkey%3Dvalue%23data&referrer=my%20referrer%20data`](market://details?id=fr.smarquis.applinks&url=link%3A%2F%2Fsmarquis.fr%2Faction%3Fkey%3Dvalue%23data&referrer=my%20referrer%20data){ .md-button }
[`market://details?id=fr.smarquis.applinks&url=link%3A%2F%2Fsmarquis.fr%2Faction%3Fkey%3Dvalue%23data&referrer=my%20referrer%20data`](market://details?id=fr.smarquis.applinks&url=link%3A%2F%2Fsmarquis.fr%2Faction%3Fkey%3Dvalue%23data&referrer=my%20referrer%20data){ .md-button .timestamp-referrer }

## 🌍 Web

Expand All @@ -28,7 +28,7 @@ The url will be rewritten by the Play Store to `link://smarquis.fr/action?key=va

| Referrer |
|---|
| `my referrer data` |
| `my referrer data`{ .timestamp-referrer } |

## ⚙️ Features

Expand All @@ -53,3 +53,15 @@ The url will be rewritten by the Play Store to `link://smarquis.fr/action?key=va
<video class="device" controls muted>
<source src="../assets/market-scheme.mp4" type="video/mp4">
</video>

<script type="text/javascript">
(function(){
let referrer = "my referrer data at " + Date.now();
let a = document.querySelector("a.timestamp-referrer");
let params = new URLSearchParams(a.search);
params.set("referrer", referrer);
a.search = params.toString();
document.querySelector("a.timestamp-referrer > code").innerText = a.href;
document.querySelector("code.timestamp-referrer").innerText = referrer;
})();
</script>
16 changes: 14 additions & 2 deletions docs/play-store-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
!!! info "Documentation"
https://developer.android.com/distribute/marketing-tools/linking-to-google-play.html#UriSummary

[`https://play.google.com/store/apps/details?id=fr.smarquis.applinks&url=link%3A%2F%2Fsmarquis.fr%2Faction%3Fkey%3Dvalue%23data&referrer=my%20referrer%20data`](https://play.google.com/store/apps/details?id=fr.smarquis.applinks&url=link%3A%2F%2Fsmarquis.fr%2Faction%3Fkey%3Dvalue%23data&referrer=my%20referrer%20data){ .md-button }
[`https://play.google.com/store/apps/details?id=fr.smarquis.applinks&url=link%3A%2F%2Fsmarquis.fr%2Faction%3Fkey%3Dvalue%23data&referrer=my%20referrer%20data`](https://play.google.com/store/apps/details?id=fr.smarquis.applinks&url=link%3A%2F%2Fsmarquis.fr%2Faction%3Fkey%3Dvalue%23data&referrer=my%20referrer%20data){ .md-button .timestamp-referrer }

Very similar to the [Market scheme](market-scheme.md).

Expand Down Expand Up @@ -32,7 +32,7 @@ The url will be rewritten by the Play Store to `link://smarquis.fr/action?key=va

| Referrer |
|---|
| `my referrer data` |
| `my referrer data`{ .timestamp-referrer } |

## ⚙️ Features

Expand All @@ -56,3 +56,15 @@ The url will be rewritten by the Play Store to `link://smarquis.fr/action?key=va
<video class="device" controls muted>
<source src="../assets/play-store-url.mp4" type="video/mp4">
</video>

<script type="text/javascript">
(function(){
let referrer = "my referrer data at " + Date.now();
let a = document.querySelector("a.timestamp-referrer");
let params = new URLSearchParams(a.search);
params.set("referrer", referrer);
a.search = params.toString();
document.querySelector("a.timestamp-referrer > code").innerText = a.href;
document.querySelector("code.timestamp-referrer").innerText = referrer;
})();
</script>

0 comments on commit 6f0cbad

Please sign in to comment.