Skip to main content

Previously when I tested using Browser SDK the Platform and Country values are appear automatically. But when I try to implement using NodeJS SDK (I’m using Node Ampli Wrapper) the values was not appear. This also happens with Amplitude Event Explorer (Chrome Extension), it doesn’t work when using NodeJS SDK while using Browser SDK is works.

 

 

Hi @tech-melaka 

Are you capturing the IP address on the events via the SDK? Country property won’t be resolved until there is a valid IP address.

You might want to check your trackingOptions in both the SDK initialization steps to see where’s the issue

https://www.docs.developers.amplitude.com/data/sdks/typescript-browser/?h=setoptout#optional-tracking


I think that is setup for Browser SDK, and If I’m not mistaken setup for NodeJS SDK it was different as I saw in this references:
https://github.com/amplitude/ampli-examples/blob/main/node/nextjs/ampli-app/lib/init-ampli.ts


Hi @tech-melaka 

Are you capturing the IP address on the events via the SDK? Country property won’t be resolved until there is a valid IP address.

You might want to check your trackingOptions in both the SDK initialization steps to see where’s the issue

https://www.docs.developers.amplitude.com/data/sdks/typescript-browser/?h=setoptout#optional-tracking

Thanks for the answer, in my case I’m using NodeJS Ampli Wrapper for NextJS. Currently due to the NodeJS implementation, there is no browser optional tracking properties. Do I need Browser SDK as well to get the default value?


Okay, looks like the NodeJS SDK won’t have the IP, platform options since it’s a server side SDK.

https://www.docs.developers.amplitude.com/data/sources/client-side-vs-server-side/#client-side-sources

 


Resolved. If others come across the same issue, you can use Ampli Wrapper but using Browser SDK. I already try and it works https://www.docs.developers.amplitude.com/data/sdks/typescript-browser/ampli/


Reply