gtm-service-for-encore
v1.1.2
Published
Small helper that provide methods for publishing GTM events
Downloads
5
Maintainers
Keywords
Readme
Encore GTM Service
Small helper that provide methods for publishing GTM events
Install
$ npm install gtm-service-for-encore
Usage
Import object from the list:
- utils
- mappers
- events
Call required method from the object
Documentation
Utils object contains util methods to work with dates: - getFormattedDateString - return date in YYYY-MM-DD string format - getNameOfTheDay - return name representation of the day of the week (i.e. Monday, Saturday)
Mappers object contains mappers for objects or parts of the object: - getPerformanceTypeName - return full name of performance type attribute
Events object contains methods allowing user to add formatted GTM event for a specific type of event: - ticketBuilder - addToCart - removeFromCart - checkout - checkoutWithDimensions - purchase - error