-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: add user ip to growthbook options #111
base: master
Are you sure you want to change the base?
Conversation
src/analytics.ts
Outdated
} | ||
growthbookOptions ??= {} | ||
growthbookOptions.attributes ??= {} | ||
growthbookOptions.attributes.id ??= _rudderstack.getAnonymousId() | ||
growthbookOptions.attributes.country ??= | ||
Cookies.get('clients_country') || | ||
(Cookies as any).getJSON('website_status')?.clients_country || | ||
Cookies.getJSON('website_status')?.clients_country || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Property 'getJSON' does not exist on type 'CookiesStatic & { noConflict?(): CookiesStatic; }'.
We'll need as any
?
9f40039
to
eac0b13
Compare
@@ -57,6 +57,7 @@ export function createAnalyticsInstance(options?: Options) { | |||
device_type: growthbookOptions?.attributes.device_type, | |||
}), | |||
...(growthbookOptions?.attributes?.url && { url: growthbookOptions?.attributes.url }), | |||
...(growthbookOptions?.attributes?.user_ip && { url: growthbookOptions?.attributes.user_ip }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be fall under privacy policy
As such, organizations processing IP addresses must adhere to the strict regulations on data protection and privacy. Under the GDPR, when an IP address is collected and processed, it is treated with the same level of protection as any other personal data, such as names, addresses, or social security numbers.
Need to confirm with the compliance before we proceed with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cloudflare by default also collect user ip address
Motivation
user ip is a needed ip address attribute to filter office ips and also blacklist/whitelist ip
Changes