Commit ed95f1b9 authored by lynn's avatar lynn Committed by GitHub

fix: add IP to test project for amplitude (#4644)

* init

* fix lint

* add comment

* lint fix
Co-authored-by: default avatarLynn Yu <lynn.yu@ContangoITs-MacBook-Pro.local>
parent 7ecbc552
...@@ -15,7 +15,6 @@ export function initializeAnalytics() { ...@@ -15,7 +15,6 @@ export function initializeAnalytics() {
console.error(`${keyName} is undefined, Amplitude analytics will not run.`) console.error(`${keyName} is undefined, Amplitude analytics will not run.`)
return return
} }
init( init(
API_KEY, API_KEY,
/* userId= */ undefined, // User ID should be undefined to let Amplitude default to Device ID /* userId= */ undefined, // User ID should be undefined to let Amplitude default to Device ID
...@@ -23,7 +22,8 @@ export function initializeAnalytics() { ...@@ -23,7 +22,8 @@ export function initializeAnalytics() {
{ {
// Disable tracking of private user information by Amplitude // Disable tracking of private user information by Amplitude
trackingOptions: { trackingOptions: {
ipAddress: false, // IP is being dropped before ingestion on Amplitude side, only being used to determine country.
ipAddress: isProductionEnv() ? false : true,
carrier: false, carrier: false,
city: false, city: false,
region: false, region: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment