-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass visited URL as query parameter #40
Conversation
Hello wouterj, thank you very much for the pr! The
I need to make this optionally. But in any case regarding the pr content: One of the ideas behind counter is that the client is responsible for defining what an unique view is and basically only send an http request once. There are multiple layers or fences if you want to ensure that. At first we save something in the sessionStorage, in case that fails we rely on HTTP caching for the request to not actually arrive to the server. Now with that change we would fix the apparently unreliable I am not sure but at the moment I see more reliably counting unique visitors more important than reliably counting referers. It might be worth to first look into why exactly the What you think, sounds reasonable? Feel free to disagree or complement. Maybe some data or something with more evidence would also make the picture at least for me clearer. Cheers and thanks |
Thanks for the fast and detailed response!
Thanks. An idea to fix this: I mostly work on PHP open source projects, in there it's common to create a file suffixed with
Oh, that's smart! I see why PR wouldn't work in this case.
I think there is a minor misunderstanding here: there is a difference between the My use-case for counter is on my personal blog. I'm most interested in which blog posts receive visits (so I can see which topics are popular and which posts I must somewhat keep up to date). Always seeing the You can see the issue with the Now I see why query parameters aren't used, maybe we can introduce a custom request header? E.g.
|
Nice idea with using a custom HTTP request header, give me a couple of days to test it and research a little - don't want to disturb production users. |
I added in the README how to run the project and removed the requirement of needing the |
Deployed optional support on the backend: c9e496e Testing it on the site itself: 670d732#diff-8abeb5fbc05848651c162faa817ac5d8edccf139c1d86fb9986c98092fddf093R76 Will change tracking code once expected functionality looks plausible. |
Thank you from taking over this idea @ihucos! I've also implemented this header on my blog. For some reason, the entry pages are still |
Hello wouterj, hmm, I just created a dummy account, here is it's shared dashbaord: https://counter.dev/dashboard.html?user=testtest2&token=VNXu9mahYW%2BCm%2FcU When you issue the following command:
The specified Speculation: |
Thank you, I made a dumb mistake (added the header object to the I'm closing this PR, as your changes in the master branch achieve what I tried to do in this PR in a better way. |
Hmm, no it isn't. As my website uses a static generator, I'm now even hard-coding the Still, I'm getting only (fyi, I posted a tweet linking to this blogpost yesterday. So I'm 100% sure that all t.co referrers are actually pointing to this blogpost) |
That is weird. I sanity checked and your javascript is right. It should work, but I cannot reproduce in the written minimal example. Hmmm if you hard coded the value its not Weird, not sure how to debug it |
Can't aimplement handling OPTIONS on the server as this would substantially decrease the throughput of tracked visits the server can handle. @wouterj can you try adding the |
Unfortunately, this still triggers the CORS error. So it seems like a custom header is not the solution here :/ |
Gotcha, thanks for trying it out |
A POC for my suggestion at #37 (comment)
I have almost no knowledge of Go and couldn't get the Makefile working (I get an
Makefile:5: .config/makefile.env: No such file or directory
error). So please let me know if I need to fix more things :)