setUserId not Working for js-sdk
Problem
The .identify('some-user-id')
call in our js-sdk is calling setUserId
for Snowplow (see code). The expectation would be that this sends the user_id
column of snowplow events for subsequent events, but it does not. It does not even send the user_id
with the events.
How to reproduce
- Start the analytics-devkit and setup a project with
app_id=example
. See instructions - Point the vanilla-js example in the SDK to the devkit:
const SNOWPLOW_COLLECTOR_URL = 'localhost:9091';
const APPLICATION_ID = 'example';
- Start the example locally
- Click the "Track event" button, then click the "Identify..." button and then "Track event" again
- You can see in the Snowplow debugger that the additional user-context is send but no `user_id``
- If you check the Clickhouse db at http://localhost:8123/play?user=test (Password: 'test') with
Select * FROM example.snowplow_events
the missinguser_id
is also apparent
Intended Outcome
user_id
field should be filled with the id from the identify
call.