I am trying to get GDPR type consent to work on an EE5.1 site.
The methods are pretty much the same as the examples in the EE5 documentation.
Consent cookie is being set OK (I can see it appear in Chrome Inspector when a consent_grant_url
button is pressed), but try as I might, I cannot get {consent:ee:cookies_performance}
to pick up that a cookies has been set.
The setting code is
{exp:consent:form
consent='ee:cookies_performance'
form_id='cookieConsentForm'
return='{current_uri}'
}
<button type="submit" name="submit" class="btn btn-success" href="{consent_grant_url}">Accept</button>
<button type="submit" name="submit" class="btn btn-outline-info" href="{consent_withdraw_url}">Decline</button>
{/exp:consent:form}
the reading code is
{if consent:ee:cookies_performance}
Google Tracking Code snippet
{/if}
but this refuses to fire.
Quoting out the {consent:ee:cookies_performance}
tag reveals it to be empty (which explains why conditional won't fire) - but I cannot work out why. I'm sure I'm missing something obvious... any ideas / suggestions would be hugely helpful.. Thanks! (EE5.1.0)