CleverTap / clevertap-web-sdk

CleverTap Web SDK
https://clevertap.com/
MIT License
14 stars 17 forks source link

Region defaulting to eu1 in production environment #290

Open abhishek-mavonic opened 1 month ago

abhishek-mavonic commented 1 month ago

Hi, This is an issue which I am facing just in production environment where the region is defaulting to eu1 even when I am explicitly passing in1 as region while initializing the sdk. While trying to run my app locally, the region is working as expected and send events to in1 region.

export async function initializeClevertap(): Promise<CleverTap> {
  const clevertapModule = await import("clevertap-web-sdk");

  clevertapModule.default.init(process.env.NEXT_PUBLIC_CLEVERTAP_ACCOUNT_ID || "", "in1");
  clevertapModule.default.privacy.push({ optOut: false });
  clevertapModule.default.privacy.push({ useIP: true });
  clevertapModule.default.setLogLevel(3);

  return clevertapModule.default;
}
singhkunal2050 commented 1 month ago

Hello @abhishek-mavonic , Have you verified the NEXT_PUBLIC_CLEVERTAP_ACCOUNT_ID env variable for the in1 region, Please ensure you are using it correctly in your production env.

abhishek-mavonic commented 1 month ago

@singhkunal2050 Yeah, NEXT_PUBLIC_CLEVERTAP_ACCOUNT_ID Env is added properly. Can you let me know in which cases can this issue happen even when in1 region is added explicitly.