Query String Support #619
Replies: 7 comments 2 replies
-
You can click on the If you're wondering why you don't get query strings in urls sometimes, it's because Chrome has it disabled by default, https://developers.google.com/web/updates/2020/07/referrer-policy-new-chrome-default |
Beta Was this translation helpful? Give feedback.
-
What I'm asking is if I can provide custom query strings at the end of my links in newsletters and such. If so, what would be the template for this? |
Beta Was this translation helpful? Give feedback.
-
There is no reporting based on query string parameters if that's what you mean. |
Beta Was this translation helpful? Give feedback.
-
This is something that I think should really be added. Knowing where visitors come from is quite essential to measure which source, campaign or medium generates the most traffic / leads. Which is essential to know where to invest your money for future campaigns. The referrer is not always known by the browser. For example in newsletters, or when the referrer uses http and the website uses https (or vice versa), or when the referrer data is blocked by the referrer (our main advertising platform blocks it and they refuse to change it for some reason - I suspect laziness). From what I can tell, these visitors are just not shown in umami under "Referrers". In Google analytics the referrer source would then be shown as "direct", as if the visitor entered the url directly in the address bar. Google analytics solves this by using the Meanwhile I discovered that there should be a way to do this in umami, by turning off I noticed that by default (when using auto-track) umami always sends the page's referrer. Which is your own website except for the first page you visit. How does umami link pageviews and events to the same user? It doesn't use cookies or session storage? Also, it would be useful to be able to see events per referrer. For example it would be useful to know which source, campaign or medium generates the most contact form requests. |
Beta Was this translation helpful? Give feedback.
-
All urls are already being collected. If you pass in |
Beta Was this translation helpful? Give feedback.
-
What I'm primarily suggesting is that there could be a query parameter that overwrites the referrer value that is sent to umami. Reporting wouldn't have to change that way. This would fix so many situations where the referrer is not collected by the browser. Also, thanks and congratulations for the good work with Umami! Can I buy you a coffee? EDIT: I've tried to do the above myself by changing line 42 of const getQueryStringParams = query => {
return query
? (/^[?#]/.test(query) ? query.slice(1) : query).split('&').reduce((params, param) => {
let [key, value] = param.split('=');
params[key] = value ? decodeURIComponent(value.replace(/\+/g, ' ')) : '';
return params;
}, {})
: {};
};
let currentRef = getQueryStringParams(location.search).utm_source || document.referrer; Umami expects the referrer values to be URL's. If they're not, they're still not displayed in the reports despite being saved in the database. To show these in the dashboard, I had to change the To show in the realtime dashboard, I tried to change |
Beta Was this translation helpful? Give feedback.
-
Basically the referrer URL is not useful at all in real-world cases. Social platforms disallowing links to be posted, or adding "noreferrer" to the link. Take a look at my real stats A simple filter for query strings is what actually works in 2024. That's how organic traffic & paid traffic works like @jnaklaas mentioned We love umami as an opensource Google Analytics alternative. But now it cannot serve as 100% alternative. |
Beta Was this translation helpful? Give feedback.
-
Google Analytics has custom query strings that allow it to detect where specific traffic came from. Umami does not appear to support this but it would be very helpful and not that difficult to implement.
Beta Was this translation helpful? Give feedback.
All reactions