Hey,
I’m using the NodeJS Event Tracker Library. I’m running into Schema errors and my events end up in bad rows, adapter/version mismatch. I’m currently using Iglu Schemas hosted on IgluCentral. It’s not clear to me in docs how to use adapters such as Google,Segment,Mailchimp.
If we want to use the out the box schemas hosted on iglu central how would we construct the payload and what extra files do we need to add to the snowplow-enrichment config files?
My end goal is to use iglu:com.google.tag-manager.server-side/purchase/jsonschema/1-0-0 to send events to snowplow enrichment app on server and pass validation.
My Code
function initialiseEmitter (url) {
const e = snowplow.gotEmitter({
endpoint: url, // http://localhost:8080 => running locally
protocol: snowplow.HttpProtocol.HTTPS,
port: 8080,
method: snowplow.HttpMethod.POST,
bufferSize: 5,
callback: (err, res) => {
if (err) {
log.info('error.emitting.snowplow.event', { err });
} else {
log.info('snowplow.running');
}
}
});
return e;
}
const snowplowTracker = snowplow.initialise(snowplowUrl);
snowplowTracker.setUserId(userData.customerId);
snowplowTracker.track(buildSelfDescribingEvent({
event: {
schema: 'iglu:com.google.analytics.measurement-protocol/page_view/jsonschema/1-0-0',
data: {
documentLocationUrl: 'test',
documentHostName: 'test',
documentPath: 'test',
documentTitle: 'test'
}
}
}));
My Error
{"schema":"iglu:com.snowplowanalytics.snowplow.badrows/adapter_failures/jsonschema/1-0-0","data":{"processor":{"artifact":"snowplow-enrich-kinesis","version":"3.2.3"},"failure":{"timestamp":"2022-10-23T15:35:17.003134Z","vendor":"config","version":"getuser","messages":[{"field":"vendor/version","value":"config/getuser","expectation":"vendor/version combination is not supported"}]},"payload":{"vendor":"config","version":"getuser","querystring":[{"name":"index","value":"0"}],"contentType":null,"body":null,"collector":"ssc-2.8.0-kinesis","encoding":"UTF-8","hostname":"18.168.88.230","timestamp":"2022-10-23T15:35:14.934Z","ipAddress":"45.61.185.198","useragent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0","refererUri":null,"headers":["Timeout-Access: <function1>","X-Forwarded-For: 45.61.185.198","X-Forwarded-Proto: http","X-Forwarded-Port: 80","Host: 18.168.88.230","X-Amzn-Trace-Id: Root=1-63555f32-1a8595d273547e2d2e75ab00","User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0","Accept: text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8","Accept-Language: en-GB, en;q=0.5","Accept-Encoding: gzip, deflate","Upgrade-Insecure-Requests: 1"],"networkUserId":"aadf37d1-ebd7-48c4-a849-7378106be458"}}}