Add UTM parameters

This commit is contained in:
Jade Ellis 2024-07-17 00:02:35 +01:00
parent 621ae06631
commit a13b75eeb4
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,7 @@
{
"name": "JadedBlueEyes",
"short_name": "Jade",
"start_url": "/",
"start_url": "/?utm_source=manifest",
"display": "minimal-ui",
"icons": [
{

View file

@ -18,10 +18,12 @@
$: handleWebShare;
const handleWebShare = async () => {
try {
let url = new URL(canonical)
url.searchParams.set("utm_medium", "share")
navigator.share({
title: data.post.title,
text: data.post.description,
url: canonical,
url: url.href,
});
} catch (error) {
webShareAPISupported = false;