You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to set the anonymous ID using setAnonymousId, but when I call track("EVENT_1", {}), the anonymous ID is null or something different. However, the anonymous ID of EVENT_2 is as expected.
Code Snippet:
const{ jitsuAnalytics }=require("@jitsu/js");const{v4: uuidv4}=require("uuid");constconfig={host: "http://jitsu-develop.d.in/",writeKey: "your_write_key_here",debug: true};constsetupJitsu=async()=>{try{constclient=jitsuAnalytics(config);if(client){constanonymousId=uuidv4();console.log("Anonymous ID:",anonymousId);awaitclient.setAnonymousId(anonymousId);console.log("anonymousId setup");awaitclient.track("EVENT_1",{});console.log("Event 1 tracked");// not as expectedawaitclient.track("EVENT_2",{});console.log("Event 2 tracked");// as expected}}catch(error){console.error("Error setting up Jitsu client:",error);}}setupJitsu()
Description:
I am attempting to set the anonymous ID using
setAnonymousId
, but when I calltrack("EVENT_1", {})
, the anonymous ID is null or something different. However, the anonymous ID ofEVENT_2
is as expected.Code Snippet:
Logs:
Environment:
@jitsu/js
Version: 1.7.1The text was updated successfully, but these errors were encountered: