Hi there,
I’m new to Amplitude.
I’m using the Browser SDK and getting the following error in the console only in production env (in local, dev env it works well):
“Amplitude Logger LError]: Invalid API key”
This is my code
function InitAmplitude() {
if (environment.AMPLITUDE_API_KEY && environment.IS_AMPLITUDE_TRACKED) {
amplitude.init(environment.AMPLITUDE_API_KEY, {
serverZone: 'US',
defaultTracking: true,
});
}
}
I double, triple checked and the API key matches what I got from Amplitude’s settings. What am I doing wrong?