1.0.34 • Published 9 years ago
mrpanalytics v1.0.34
mrpanalytics
Client side Analytics using the W3C CEDDL Digital Data JSON.
This module is a wrapper to the global 'Analytics' lib. This module only handles event tracking - e.g. Add To Bag.
For more info on the W3C Digital Data JSON, see:
https://confluence.nap/pages/viewpage.action?pageId=18617146
Install
npm install mrpanalytics
usage
Require module
var MrpAnalytics = require('mrpanalytics');
On DOM Ready
MrpAnalytics.setUp(window.digitalData, window.NAP.WebAn);
- window.digitalData - Global odject containg information about the page and any products. Using the W3C CEDDL standard
- window.analytics - Global Analytics JS lib injected into the using Adobe Analytics.
Track event - e.g. Add To Bag
MrpAnalytics.trackEvent(eventJson);
- eventJson - JSON object containing information about the event based on the following format:
- eventName - e.g. 'Add To Bag',
- effect - e.g. 'Added to bag',
- quantity
- size
- sku
Helper Properties
SITE_WIDE_EVENTS = {
"addToCart": {
"eventName": "add to cart",
"effect": "update cart"
}
}
Provides a list of site wide 'eventName' and 'effect' properties.
1.0.34
9 years ago
1.0.33
9 years ago
1.0.32
9 years ago
1.0.30
9 years ago
1.0.28
9 years ago
1.0.27
9 years ago
1.0.26
9 years ago
1.0.25
9 years ago
1.0.21
9 years ago
1.0.20
9 years ago
1.0.19
9 years ago
1.0.18
9 years ago
1.0.17
9 years ago
1.0.16
9 years ago
0.0.15
9 years ago
0.0.14
9 years ago
0.0.13
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
9 years ago
0.0.9
9 years ago
0.0.8
9 years ago
0.0.7
9 years ago
0.0.6
9 years ago
0.0.5
9 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago