@brandandcelebrities/atags
v1.2.2
Published
Events Tag Management
Downloads
60
Readme
ATags
Installation
npm install --save @brandandcelebrities/atagsImporting
import { setTagOptions, tagEvent } from '@brandandcelebrities/atags';Methods
Tag an event event in category category, with an optional description and set this event as interactional (default) or not.
tagEvent(category, event[, description='', interaction=true, additionalParams={}] );You can set Options with function
setTagOptions( {
dev: Boolean, // default: false. Set environment in development mode, so Tags won't be dispatched but printed to the console
datalayer: Boolean // default: false. Set to true if current site is using a DataLayer
})Informations
Analytics called on tagEvent:
- Google Analytics (will print a warning in console if
window.gaorwindow.dataLatayeris not defined)
