snowplow / snowplow-gtm-server-side-tag

A Google Tag Manager Server-side Tag template for sending events to a Snowplow Collector
Apache License 2.0
4 stars 2 forks source link

Add non-Snowplow Page View support #4

Closed paulboocock closed 2 years ago

paulboocock commented 2 years ago

There are other Client templates available for GTM SS, such as the GA4 client. Many of these will populate the common object in GTM SS, and this tag should be able to read and relay as many of those as possible to a Snowplow Collector.

One of the most obvious events which this tag doesn't currently relay is the standard "page_view" event with the GA4 Client generates.

We should add support for this, we should map the page_view event name to the pv property of a tp2 payload. The remainder of the event should be built up from the standard event object. I think we can simply us mkStandardPairs with pv.