analytics
analytics copied to clipboard
Add configurable page view custom event name for Google Tag Manager
The current page implementation is not useful as it does not insert an event key into the event data on the dataLayer. As there is no "standard" event name to use here, this proposes not to send a page event at all unless the user has provided their preferred custom event name. If the event name is provided, this uses it to send the event, which can then be used as a script trigger in the Google Tag Manager interface.
Fixes https://github.com/DavidWells/analytics/issues/348