Javascript tracker: Which is the correct unstructured event tracking? "trackSelfDescribingEvent" or "trackUnstructEvent"

I’m trying to capture unstructured events with the javascript tracker. The documentation says to use the trackSelfDescribingEvent method, however when I try to use this, I get Uncaught TypeError: Cannot read property 'apply' of undefined.

When I search the snowplow source code, there is no reference to trackSelfDescribingEvent, but instead multiple references to trackUnstructEvent.

Is the documentation outdated?

Hi Grelas,
If I understand correctly trackSelfDescribingEvent is being introduced with the upcoming 2.7.0 release of the JS tracker. I believe the intention is for this method to replace the existing trackUnstructEvent method. Docs for the current 2.6.1 version of the tracker can be found here

2 Likes

Hi @grelas,

@njenkins is right. The Javascript version 2.7 hasn’t been released yet. A small correction, though. The latest available release is 2.6.2 (not 2.6.1). Until 2.7 is released, use trackUnstructEvent instead.

1 Like