Hi,
I am new to snowplow. I am having issues understanding session and user - ids.
When I load my app and trigger any further events then the domain session and user ids stays the same in every call.
But when I am reloading the page then a new pageView event gets trigger and new domain session and user ids get created.
My expectation is to have a session and user id which should not change on page reload but the user id should stay same for a defined period of time and session id should stay same until the session ends.
Following is the configuration for snowplow:
<script type="text/javascript">
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","https://cdn.jsdelivr.net/gh/snowplow/sp-js-assets@2.16.1/sp.js","snowplow"));
snowplow("newTracker", "sp", "{collectorUrl}", {
appId: "AnalyticsApp", // You will add snowplow on multiple apps so appId will help you detect what app you are tracking
platform: "web",
cookieDomain: null,
discoverRootDomain: true,
cookieName: "_sp534_",
encodeBase64: false,
respectDoNotTrack: false,
userFingerprint: true,
userFingerprintSeed: 6385926734,
pageUnloadTimer: 0,
forceSecureTracker: true,
eventMethod: "post",
bufferSize: 5,
maxPostBytes: 45000,
crossDomainLinker: function (linkElement) {
return (linkElement.href === "http://acme.de" || linkElement.id === "crossDomainLink");
},
cookieLifetime: 86400 * 31,
stateStorageStrategy: "cookie",
contexts: {
webPage: true,
performanceTiming: true,
gaCookies: true,
geolocation: false
}
});
snowplow('trackPageView');
</script>
I am using 2.16.1 version of snowplow.
A little help here is really appreciated.
My end goal is to have user and session id working properly and not resetting on page reload.
Should I rely on Domain session and user ids?