Really-Simple-Plugins / complianz-gdpr

Complianz Privacy Suite (GDPR/CCPA)
https://complianz.io
Other
92 stars 39 forks source link

turnstile integration #403

Closed Messa1 closed 1 year ago

Messa1 commented 1 year ago

I tried by your tutorial - but that doesn't work right. turnstile

When i click the

it will accept the cookies but don't load turnstile checker. As you see in my screenshots - I need to reload the page that I see turnstile checking for if im human.

Bildschirmfoto 2023-07-18 um 10 29 25 Bildschirmfoto 2023-07-18 um 10 29 33

Is there anything i can do? Trigger a reload? Or did you have an hint?

jarno-vos commented 1 year ago

Hi @Messa1,

I have created a test environment with the latest version of Complianz, and then proceeded to configure CloudFlare Turnstile as per the instructions in the attached article.

This resulted in the exact behavior that I would expect, the CloudFlare Turnstile element is blocked before consent is obtained; and after consent it is immediately inserted in the form, no reload necessary.

You can view my example here.

I'd be curious to know the difference with your set-up though. If you provide us with an URL to your example page, that would allow us to take a closer look.

Alternatively, if you're OK with a reload after consent, you could apply the following MU Plugin (https://github.com/Really-Simple-Plugins/complianz-integrations/blob/master/reload-after-consent.php) to reload the page after clicking "Accept" in the Cookie Banner.

Kind regards, Jarno

Messa1 commented 1 year ago

As I see in your example it works - But did you try whit the HTML Code of your Tutorial? Yeah I just add that with the reload that seem to fix some cases.

Your HTML Code:

<div data-service="Turnstile" data-category="statistics" data-placeholder-image="https://turnstijl.instawp.xyz/wp-content/plugins/complianz-gdpr/assets/images/placeholders/default-minimal.jpg" class="cmplz-placeholder-element cf-turnstile cmplz-processed cmplz-placeholder-1 cmplz-blocked-content-container" data-sitekey="0x4AAAAAAAHiDE3cXfVUfsca" data-theme="light" data-placeholder_class_index="1"><button class="cmplz-blocked-content-notice cmplz-accept-category cmplz-accept-statistics" data-service="Turnstile" data-category="statistics" aria-label="Click to accept statistics cookies and enable this content">Click to accept statistics cookies and enable this content</button></div>

That HTML Code form your tutorial

<div data-category="statistics" class="cmplz-blocked-content-container cmplz-blocked-content-notice cmplz-accept-service cmplz-accept-marketing cmplz-turnstile" 
style="text-align: left; cursor: pointer;">
Click here to accept Cloudflare Turnstile as a service before sending the form. <a href="/cookie-policy"> Read more</a>
</div>
AertHulsebos commented 1 year ago

HI @Messa1,

As seen here; https://turnstijl.instawp.xyz/form/ same HTML. Maybe you could add data-service="{name}" - in this case {name} would be the title of the script center block to block Turnstile.

But without a live example that doesn't work, it's hard to detect the issue.

Messa1 commented 1 year ago

@AertHulsebos I will try - I will close the ticket. Im using now the reload, that works :)