Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set privacyDefaultMode using npm library #10

Open
KnuX opened this issue Jan 24, 2025 · 0 comments
Open

Unable to set privacyDefaultMode using npm library #10

KnuX opened this issue Jan 24, 2025 · 0 comments

Comments

@KnuX
Copy link

KnuX commented Jan 24, 2025

While using the library piano-analytics-js in a NextJS project, privacyDefaultMode value is ignored. PA will load and set a "pa_privacy" cookie with "optin" value, confirmed by pa.getConfigurationMode('privacyDefaultMode').

This code from the documentation has no effect, even before the import line :

window._pac = window._pac || {}; 
_pac.cookieDomain = ".mysite.com"; 
_pac.privacyDefaultMode = "exempt";

<script 
  type="text/javascript" 
  crossorigin="anonymous" 
  src="https://tag.aticdn.net/piano-analytics.js" 
></script>;

If I replace the import line line by a script that injects in the head of the page the script 'https://tag.aticdn.net/piano-analytics.js', it's OK.

Maybe there is an other way to define default value for this library...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant