Prevent page reload after user clicks on cookie banner (TecArt plugin)

Hi

I’m currently working on implementing Google Consent Mode V2 and I’m encountering an issue with the cookie banner provided by the TecArt plugin.

Problem: Whenever a user clicks on the cookie banner, the page reloads. This results in two page views being recorded in Google Analytics, which leads to inaccurate data.

Question: How can I prevent the page from reloading after the user clicks on the cookie banner?

Any guidance or suggestions on how to address this issue would be greatly appreciated.

Thank you in advance for your help!

Not enough information. Do you have any JS error when it’s clicked? If not, them most likely (but not necessarily) this behavior is intentional. Is it an anchor tag there?

There is no error message and it’s not an anchor tag. It could be that this is intentional but I’m wondering if it’s possible to prevent it.

@sibs, If you take a look at the JS code of the TecArt plugin, you’ll notice it performs a windows.location.reload() on allowAllCookies(), denyAllCookies() and onCheckboxSettings(). That means a refresh of the page…

You should discuss this further on the Github repo of TecArt.

1 Like

thank you - I will discuss it there.