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

Issue with IP Anonymization #86

Open
jayant-lumino opened this issue Sep 4, 2024 · 0 comments
Open

Issue with IP Anonymization #86

jayant-lumino opened this issue Sep 4, 2024 · 0 comments

Comments

@jayant-lumino
Copy link

jayant-lumino commented Sep 4, 2024

My goal is to anonymize IP addresses to comply with GDPR regulations, but I'm having trouble getting it to work correctly.

Here’s the relevant code snippet I'm using:

const googleAnalticsKey = 'G-**********';

ReactGA.initialize(googleAnalticsKey, {
  gaOptions: {
    anonymizeIp: true
  }
});

Even with anonymizeIp set to true, when I inspect the network requests using Chrome Developer Tools, I'm not seeing the aip=1 parameter in the query string, which indicates that IP anonymization isn't being applied.

I’ve also tried using ReactGA.set({ anonymizeIp: true }); after initialization, but the issue persists.

Could you please advise on how to properly enable IP anonymization using ReactGA? Is there something I’m missing, or is there another approach I should consider?

Thanks in advance for your help!

And yes according to this answer it should be enable by default but still it's not working.

@jayant-lumino jayant-lumino changed the title Issue with IP Anonymization Using ReactGA Issue with IP Anonymization Sep 4, 2024
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