{"action":"created","issue":{"url":"https://api.github.com/repos/WICG/web-share/issues/13","repository_url":"https://api.github.com/repos/WICG/web-share","labels_url":"https://api.github.com/repos/WICG/web-share/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/WICG/web-share/issues/13/comments","events_url":"https://api.github.com/repos/WICG/web-share/issues/13/events","html_url":"https://github.com/WICG/web-share/issues/13","id":193911359,"number":13,"title":"Add a way to inject metrics into the shared URL","user":{"login":"mgiuca","id":228433,"avatar_url":"https://avatars.githubusercontent.com/u/228433?v=3","gravatar_id":"","url":"https://api.github.com/users/mgiuca","html_url":"https://github.com/mgiuca","followers_url":"https://api.github.com/users/mgiuca/followers","following_url":"https://api.github.com/users/mgiuca/following{/other_user}","gists_url":"https://api.github.com/users/mgiuca/gists{/gist_id}","starred_url":"https://api.github.com/users/mgiuca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgiuca/subscriptions","organizations_url":"https://api.github.com/users/mgiuca/orgs","repos_url":"https://api.github.com/users/mgiuca/repos","events_url":"https://api.github.com/users/mgiuca/events{/privacy}","received_events_url":"https://api.github.com/users/mgiuca/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-06T23:04:34Z","updated_at":"2016-12-07T23:28:56Z","closed_at":null,"body":"FR from Discourse: https://discourse.wicg.io/t/web-share-api-for-sharing-content-to-arbitrary-destination/1561/10\r\n\r\nThe developer wants a way to automatically insert a query parameter onto the shared URL like \"`utm_source=$TARGET_APP`\", which would identify which app the user chose to share _to_, so that the sending app can gather metrics about where their incoming links are coming from. For example:\r\n\r\n1. User is on https://example.com and clicks a Web Share button.\r\n2. The site calls `navigator.share` with `url: 'https://example.com``.\r\n3. Picker is shown. User chooses Facebook.\r\n4. API injects `utm_source=facebook` into the URL.\r\n5. User shares a post on Facebook.\r\n6. User's friend clicks the link from Facebook mobile app and friend's browser opens https://example.com/?utm_source=facebook.\r\n\r\nThis is a bit worrying from a privacy perspective -- the sender is not supposed to know which app the user chose to share to. But this is a lot more indirect because the sender only gets info about the shared app once the friend clicks the link in Step 6, so there's nothing to directly tie the app to the user. Will have to think on this.\r\n\r\nThis isn't something I'd want to do automatically. I'd want the sender to be able to opt in by adding a new data field to `ShareData`, e.g., `add_target_to_url: 'utm_source'`.\r\n\r\nMy final concern is that we don't have a good scheme to name the target app. I suppose if it's a Web Share Target it would be the full URL to the app's manifest scope. If it's an Android app, it would be the Android package name, etc. So we wouldn't get something as clean as \"facebook\"; it would be more like \"com.facebook.katana\" (the Android app). It's also a bit messy because it would be the name of the app the user shared _to_, not the name of the app the friend clicked the link in (so if the user shared to the Android app, but the friend clicked the link on the web, the `utm_source` would still show the Android app package name). This all seems very messy."},"comment":{"url":"https://api.github.com/repos/WICG/web-share/issues/comments/265606960","html_url":"https://github.com/WICG/web-share/issues/13#issuecomment-265606960","issue_url":"https://api.github.com/repos/WICG/web-share/issues/13","id":265606960,"user":{"login":"mgiuca","id":228433,"avatar_url":"https://avatars.githubusercontent.com/u/228433?v=3","gravatar_id":"","url":"https://api.github.com/users/mgiuca","html_url":"https://github.com/mgiuca","followers_url":"https://api.github.com/users/mgiuca/followers","following_url":"https://api.github.com/users/mgiuca/following{/other_user}","gists_url":"https://api.github.com/users/mgiuca/gists{/gist_id}","starred_url":"https://api.github.com/users/mgiuca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgiuca/subscriptions","organizations_url":"https://api.github.com/users/mgiuca/orgs","repos_url":"https://api.github.com/users/mgiuca/repos","events_url":"https://api.github.com/users/mgiuca/events{/privacy}","received_events_url":"https://api.github.com/users/mgiuca/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T23:28:56Z","updated_at":"2016-12-07T23:28:56Z","body":"mobtec (the requester): \"There are no referrer. It will be the first visit. It will be count as direct access.\"\r\n\r\nNot exactly sure what this means, but I think when User B is in a mobile app it won't be possible for the website to discover where it came from."}}
{"actor":{"display_login":"mgiuca"}}