Replies: 2 comments
-
Directly-entered URLs are not supposed to carry "referrer" data. You can read more about HTTP referrer semantics in RFC 9110:
Therefore, if a user enters the shorturl manually, that request is considered to have no referrer. You will need to add a parameter(s) to the long URLs stored in YOURLS, which your analytics solution can use as the source (if no referrer is sent); the HTTP referrer isn't an option here. Adding these tags can be automated with a plugin; for example, one longstanding entry on our Awesome List (though not personally tested) is this Google Analytics Link Tagging plugin (GH repo). If that plugin is not sufficiently configurable for your use case, you can likely use it as a starting point for your own link auto-tagger. |
Beta Was this translation helpful? Give feedback.
-
Understood. Thank you for the detailed explanation! |
Beta Was this translation helpful? Give feedback.
-
Is there any way to enable referral url to show on site's stats the short url linked for?
For example, when visiting the a site using a short url shared on social media, I can see the traffic came from social media. However, using the short url in the browser, the site stats don't show the origin of the traffic. I would like it to show that it came from the specific short url.
Beta Was this translation helpful? Give feedback.
All reactions