Hi, I have a basic function here
function testCustomEvent() { snowplow('trackSelfDescribingEvent', { schema: 'iglu:com.acme/customEvent/jsonschema/1-0-0', data: { customData: 'customDataValue' } } ); }
which happens to work when I attached it to a button and call directly
<button onclick="testUserId()">Test button</button>
What I want is to insert this to a trackPageView or enableLinkClickTracking as context,
let dynamicContext=function(element){return context};let contexts=[dynamicContext];snowplow('enableLinkClickTracking',null,null,contexts)
I tried adding,
snowplow('trackPageView',null,null,function(){return[{schema:"iglu:com.acme/customEvent/jsonschema/1-0-0",data:{customData:'customDataValue'}}]})
on the s3 logs JSON, it does appear but not on the database nor inserted.
but on the “testCustomEvent” alone, it does appear on the database.
anyone can help?