Hi Team,
I am new to snowplow and trying to generate some self describing events using javascript sdk and my pipeline is deployed in aws with postgres as target. Below are the steps I have followed
so far,
1> deployed aws pipeline with PG target
2> Created the schema for the self describing event and pushed to my iglu server using igluctl
3> initiated tracker in code with collector URL and
trying to pass the schema in self describing event following the below structure:
>
> <script type="text/javascript" async=1>
> ; (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/npm/@snowplow/javascript-tracker@3.17.0/dist/sp.js", "snowplow_tracker"));
> </script>
>
>
> <script type="text/javascript">
>
> // window.snowplow('addPlugin',
> // "https://cdn.jsdelivr.net/npm/@snowplow/browser-plugin-form-tracking@latest/dist/index.umd.min.js",
> // ["snowplowFormTracking", "FormTrackingPlugin"]
> // );
>
> snowplow_tracker("newTracker", "webtracking", "http://my_elb_in_aws.amazonaws.com", {
> appId: "login_page_actual_node",
> eventMethod: "get",
> encodeBase64: false,
> userFingerprint: true,
> platform: "web",
> contexts: {
> webPage: true,
> performanceTiming: true,
> gaCookies: false,
> geolocation: false
> }
> });
>
> snowplow_tracker('trackPageView', 'my custom page title', [{
> data: {
> "a Date": new Date().toString(),
> "a String": "Hello there!"
> }
> }]);
>
> window.snowplow('trackSelfDescribingEvent', {
> event: {
> schema: 'iglu:com.acme_company/viewed_product/jsonschema/2-0-0',
> data: {
> productId: 'ASO01043',
> category: 'Dresses',
> brand: 'ACME',
> returning: true,
> price: 49.95,
> sizes: ['xs', 's', 'l', 'xl', 'xxl'],
> availableSince: new Date(2013,3,7)
> }
> }
> });
> </script>
But I don’t see the self describing event created or loaded in to the target and I don’t see any
error on console as well. Could you pls let me know If I am missing something. Happy to share more info if required.