ColinEberhardt / applause-button

A zero-configuration medium-style button for adding applause / claps / kudos to web pages and blog posts
http://applause-button.com/
MIT License
427 stars 41 forks source link

Referer is the URL (not URIs) #72

Open tallerawkan opened 3 years ago

tallerawkan commented 3 years ago

Hi Colin! Thank you so much for this project! It is realy great and easy to use!

I am having trouble because it is getting my website url, not considering the uris. So instead of counting claps for a single post, it is counting for all of them.

It might be because of this: https://developers.google.com/web/updates/2020/07/referrer-policy-new-chrome-default

May you help me?

ColinEberhardt commented 3 years ago

Can you please provide a link to your website?

tallerawkan commented 3 years ago

https://tallerawkan.cl I could do it setting up a referrer policy manually to no-referrer-when-downgrade. Otherwise, it assumed a strict-origin-when-cross-origin policy and it was only sending my main url.

El sáb, 13 de feb. de 2021 a la(s) 05:25, Colin Eberhardt ( notifications@github.com) escribió:

Can you please provide a link to your website?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ColinEberhardt/applause-button/issues/72#issuecomment-778583104, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6EHA7DKGJ6GJ5T7ALWF2TS6YZQBANCNFSM4XRQYQXQ .

fchabouis commented 2 years ago

I had the same problem and managed to handle it using the url attribute.

I use Hugo, so I can pass the page permalink to the button like this, and each page gets its own independant counter.

<div>
  <applause-button url={{ .Permalink }} />
</div>

You can adapt this solution to your particular stack.