snowplow / snowplow-gtm-server-side-client

A Google Tag Manager Server-side Client template for collecting events using the Snowplow JavaScript Tracker
https://snowplowanalytics.com
Apache License 2.0
9 stars 3 forks source link

Release/0.4.0 #16

Closed paulboocock closed 3 years ago

paulboocock commented 3 years ago

Some biggish changes to the Client with this release.

Self Describing events and contexts are now on the root of the event as:

x-sp-self-describing-event_* and x-sp-contexts_*. This brings the client in line with how events are parsed in the analytics SDK (except for I've renamed unstruct_event). I've also extended tp2 events to place all the properties on the event in the same way the enriched events would too, meaning it's easier to build tags regardless of where the event came from.

For enriched events, I've supported both an array and an object on the API. This is because we currently support sending single events but I anticipate we'll have batching support soon.

I've also ran prettier over the file, so you might be best taking this one commit at a time from a review point of view.