Question for #Mastodon experts: When someone posts a link here, say to a news story, is the news site able to tell the traffic came from Mastodon?

I know news organizations watch this type of thing closely (where traffic referrals come from). And some traffic is sometimes attributed to "dark social," when the referrer is unknown.

If traffic from Mastodon links is not apparent to news sites, news orgs may just lump it in with "dark social" and not realize/perceive the value in Mastodon.

@robsonfletcher in theory, yes, the same as they can tell from any other source.
The browser itself sends an HTTP Referer header (yes, that spelling mistake is intentional, it was spelled wrong over 20 years ago and has stuck around). See: https://en.wikipedia.org/wiki/HTTP_referer
From an app though, all bets are off, it depends on app, browser, etc what actually happens.
HTTP referer - Wikipedia

@david @robsonfletcher Although that's generally true, Mastodon links are all set to noreferrer (and yes, HTML uses a different spelling than HTTP!)

This is to protect the user's privacy, since the exact URL they come from depends on their feed and not the URL of the post their viewing. It also protects the privacy of private posts. The big social networks hide privacy with their own URL redirect systems (like t .co for twitter) — which also let them track clicks!

Link types: noreferrer - HTML: HyperText Markup Language | MDN

The noreferrer keyword for the rel attribute of the <a>, <area>, and <form> elements instructs the browser, when navigating to the target resource, to omit the Referer header and otherwise leak no referrer information — and additionally to behave as if the noopener keyword were also specified.

@AmeliasBrain @david So does this means a lot (or all?) traffic coming from Mastodon to news sites isn't apparent as coming from Mastodon?
@robsonfletcher @AmeliasBrain if referers aren’t being passed some other tracking method would need to be used.
Maybe it’s worth creating an ActivityPub analytics service? #softwareideas i.e. monitor the fediverse for your domain on publicly accessible data

@david @robsonfletcher Yep. It will just show up on analytics the same as if someone copied the URL into the bar or used a bookmark or something: no origin for analytics.

Not sure what else you could do. Searching for URLs within post content isn't easy on the fediverse, either.

For tracking link clinks from official posts by a publication, they could add ?utm tracking to the end of the URL. But that wouldn't detect the "organic" shares from readers sharing links to their audiences.

@david @robsonfletcher The one thing you can do, maybe, is watch your server logs for requests from mastodon servers fetching the link preview data.

But I'd presume those previews are cached, so you'd only see it once per Masto host per article URL. You wouldn't get any quantitative info about how many people posted the link, let alone how many clicked on that link.

@AmeliasBrain @robsonfletcher that’s why I’m thinking an opt-in standardized flag that mastodon uses would be ideal for this.
If it’s standardized then it will be easier to use for opt-in analytics.
Even if you can’t scrape the entire fediverse, with enough p-hacking you can figure things out close enough…
@robsonfletcher @AmeliasBrain @david the link poster can add a tracking token to the url relatively easily (?src=mastodon") but it's not something most people would do unless they were the author/social media manager.