I'm storing cookie of anonymous user until I haven't user's email.
when user register his email in form, I want to set email as UserID.
So I though I should have call snowplow event again when submit button is press and same time email value should be set
window.snowplow('setUserId', emailvalue);
I'm attaching my full code below
window.snowplow('newTracker', 'cf', 'dlfshzdhg01m3.cloudfront.net',
{ appId: 'Acds51',
platform: platformval,
cookieDomain: "ec2-52-91-83-06.compute-1.amazonaws.com",
cookieName: "_sp534_", encodeBase64: false, respectDoNotTrack: false,
userFingerprint: true,
userFingerprintSeed: 18785926734,
pageUnloadTimer: 0,
forceSecureTracker: true,
useCookies: true,
bufferSize: 5, maxPostBytes: 45000,
contexts: { webPage: true, performanceTiming: true, gaCookies: true, geolocation: true }});
window.snowplow('enableActivityTracking', 30, 10);
window.snowplow('trackPageView');
window.snowplow('enableLinkClickTracking', null, true);
window.snowplow('refreshLinkClickTracking');
if(emailval.length > 0)
{ window.snowplow('setUserId', emailval);
}else{ window.snowplow('setUserIdFromCookie', '_sp534_id.e93d');} 2nd Question is I set value of Platform is platformval (where platformval either "mob" or "web"). when user opens link using web browser I'm setting "web" otherwise it takes "mob"
Is it correct? please suggest me