Structured events not stored


#1

Hi all,
after many tries I can’t figure out from a weird behaviour of my SnowPlow instance. I have set up a javascript->clojure->redshift batch stack and everything seems to work (events are recorded correctly with no errors, schedulation gets no error from a week).

I’m trying to implement a simple structured data layer as explained here but I can’t get things work.
From my tracker:

;(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”, “//d1fc8wv8zag5ca.cloudfront.net/2.6.1/sp.js”, “trackerProd”));window.tracker(“newTracker”, “cf”, “my.domain.com”, {
appId: “TEST-0000001”
});
window.trackerProd(‘trackPageView’, null, null);
window.trackerProd(‘trackStructEvent’, ‘myCategory’,‘myAction’,‘myLabel’,‘myProperty’,‘myValue’);

I can’t see any value in my redshift table in se_category, se_action, se_label, se_property or se_value columns.
I can see correct values logged in tomcat logs as get parameters but something inside the emr-etl-runner seems to fail translating get parameters in sql values.

I would be very grateful if someone could give me some advice…

Thanks,
Federico


#2

Hi @Federico1,

The problem is in this part:

window.trackerProd('trackStructEvent', 'myCategory','myAction','myLabel','myProperty','myValue');

specifically the 'myValue' string, which should be a float.

Category, Label, Action and Property are all strings but the value must be a float. It is often used for a monetary value so a float makes sense.

Please let us know if that solved the issue.

All the best,
Leon


#3

Thanks for your tip!

It solved my problem. :grinning: