vid=NaN (domain_sessionidx?)

As of 9/1 we’re seeing a sudden large volume of bad records with the error: Field [vid]: cannot convert [NaN] to Int

I believe this is the domain_sessionidx value?

We are still using JS tracker v2.6.2, no change there. Was there a change in certain browser functionality on that date that might affect this value somehow? (Just a shot in the dark, I know this value is derived from the user cookie.) Any other ideas on how this value could come back NaN?

It’s not affecting all events, only <=10%.

I am also seeing duid=value= in the same bad records, again suggesting a cookie parsing issue?

Any ideas or corroboration appreciated.

Root cause was found, it was simply cookie code collision in a small part of the site that unfortunately propagates forward.

1 Like

Thanks for sharing the answer @seanhall, much appreciated! When you get an issue like this, it’s worth checking JavaScript scripts and cookies for any collisions…

can you please advise how did you fix this issue ?
On what scenarios these cookie code collision happen ? Does it have a patter ?

This would occur if you used/altered a cookie with the same name as the one the Snowplow JavaScript Tracker creates. By default that is something like _sp_id.xxxx where xxxx is a hash based on your domain. It seems unlikely you’ll have a direct collision, as this cookie name is quite specific, but you might have a tool/library that is interferring with this cookie somehow or altering it in a way that isn’t compatible with the JavaScript tracker, leading to NaN values being passed into the request.

You could attempt to rename the Snowplow cookie when initialising the tracker (this will reset all current domain_userid and session values though), or try to identify the tool/library on your site that is preventing the _sp_id cookie from working correctly.

Thanks Paul. Will definitely take a look.

@PaulBoocock Question on opt 1 mentioned above. Did you mean to reset or disable the cookie code on the js tracker ? .

Sorry for taking a while to respond, this one slipped by me. I was suggesting to rename it, from the default, using the cookieName parameter when initiasing the tracker.