You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a web performance consultant, I need to track which page views were viewed with the cookies accepted and which ones with cookie refused, so that I will be able to quickly check on the impact of third parties.
In order to do that, we require that, when users make a choice by clicking on the cookie layer "accept" "refuse", etc. the data-wp-page-cookie attribute of the <main> tag is updated via JavaScript with the resulting value.
The value data-wp-page-cookie is a string, containing any value that would make us able to distinguish which page views were made after users accepted what.
Some examples could be:
all-accepted
none-accepted
an array of accepted cookie types, e.g. marketing, technical, ...
Sample code, just to give you the idea:
constacceptedCookies=someFunctionToGetTheValues();letelementWithTheCookieAttribute=document.querySelector('[data-wp-page-cookie]');if(!elementWithTheCookieAttribute){// this should never be the case because the attribute // is already in the `main` tagelementWithTheCookieAttribute=document.createElement(`div`);document.body.appendChild(elementWithTheCookieAttribute);}elementWithTheCookieAttribute.setAttribute('data-wp-page-cookie',acceptedCookies.join());
As a web performance consultant, I need to track which page views were viewed with the cookies accepted and which ones with cookie refused, so that I will be able to quickly check on the impact of third parties.
In order to do that, we require that, when users make a choice by clicking on the cookie layer "accept" "refuse", etc. the
data-wp-page-cookie
attribute of the<main>
tag is updated via JavaScript with the resulting value.The value
data-wp-page-cookie
is a string, containing any value that would make us able to distinguish which page views were made after users accepted what.Some examples could be:
all-accepted
none-accepted
marketing, technical, ...
Sample code, just to give you the idea:
Related ticket: #72.
The text was updated successfully, but these errors were encountered: