utm params in hash, custom ref setting #835
Replies: 3 comments 7 replies
-
thanks @maximeg! how can utm tags mess with SEO? |
Beta Was this translation helpful? Give feedback.
-
A manual mode is definitely something we plan to add so you can run arbitrary JS and send the pageview manually. This should allow a bunch of non-standard cases like this. I'm curious how common this hash-based UTM approach is. Sounds like it's quite rare which makes it unlikely to make it into the Plausible product itself. |
Beta Was this translation helpful? Give feedback.
-
@ukutaht with the manual option now described in #177 is it possible to send the pageview with utm_* tags from the fragments? For example, with GA (which anyways already support this natively) we can also set a specific utm tag when registering the pageview.
Can we do a similar thing with the manual option now? Capturing (and looping through) the tracking utm_* from the fragment is something that can be done outside plausible, if we can then set it as a parameter and then send it to plausible without changing this URL. |
Beta Was this translation helpful? Give feedback.
-
Sometimes, utm params are used in the hash part of the URL, not to mess with SEO among other things:
Sometimes, you calculate and validate a source on the website/webapp and want to report it to the tracker.
Currently, as per the code I looked yesterday, the
utm_xxx
,ref
, etc... params are derived server side from the query string.It would be nice to have a way to report those params from the javascript tracker, having the server side derivation as a fallback.
This would allow heavy customization.
As an example, for the
https://my-website.com/#utm_source=twitter
case, I like to remove those params from the hash once the page is loaded to clean things for the user.Note that an acceptable way of doing things is to switch to manual tracking of pageviews (i.e. not use
enableAutoPageviews
), and altering the URL sent. It's one of the "official" ways of customizing GA for example.I've seen that it is currently possible as everything in the
eventData
payload can be overridden:So one can can alter the URL reported and manually add some
utm_source
params or else to the query string (as query string is ignored in Plausible).So the good news is that nothing has to be developed for this set of customization to work at first, and we can just improve the documentation.
Beta Was this translation helpful? Give feedback.
All reactions