1.0.34 • Published 10 years ago

mrpanalytics v1.0.34

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

mrpanalytics Circle CI

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

10 years ago

1.0.33

10 years ago

1.0.32

10 years ago

1.0.30

10 years ago

1.0.28

10 years ago

1.0.27

10 years ago

1.0.26

10 years ago

1.0.25

10 years ago

1.0.21

10 years ago

1.0.20

10 years ago

1.0.19

10 years ago

1.0.18

10 years ago

1.0.17

10 years ago

1.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago