Pretty cool! Random thought, I'd check to see if sending it via email or some other mediums that try to prerender or preview the page will count as a view and burn the page before the person can click on the link.
Hi Harrjm,
thanks for the interest in the project. You are totally right, very good point. I actually ran into this issue :)
So here is how I fixed it:
In a first version, I just blocked known crawlers and bots by checking the user agent. But there is a much more elegant solution: Bots usually only do GET requests. So you can do POST or whatever via JS after the pages loads and you'll be fine.
Pretty cool! Random thought, I'd check to see if sending it via email or some other mediums that try to prerender or preview the page will count as a view and burn the page before the person can click on the link.
Hi Harrjm,
thanks for the interest in the project. You are totally right, very good point. I actually ran into this issue :)
So here is how I fixed it:
In a first version, I just blocked known crawlers and bots by checking the user agent. But there is a much more elegant solution: Bots usually only do GET requests. So you can do POST or whatever via JS after the pages loads and you'll be fine.
C.