Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cnbritain/merlin-frontend-gatracker-js

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cnbritain/merlin-frontend-gatracker-js

Google analytics wrapper

  • 1.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

merlin-frontend-gatracker-js

Google analytics wrapper

JS Documentation

GATracker

Kind: global class

new GATracker(id, _config)

ParamTypeDescription
idStringThe GA unique id
_configObject

gaTracker.send(hitType, config)

Fires a ga send call

Kind: instance method of GATracker
Access: public

ParamTypeDescription
hitTypeString
configObjectData to send along with the call

gaTracker.set(fieldName, value)

Fires a ga set call to set information

Kind: instance method of GATracker
Access: public

ParamTypeDescription
fieldNameString/ObjectEither a key or an object with data
valueString/Number

GATracker.TRACKERS : Array

List of trackers that have been created

Kind: static property of GATracker

GATracker.INDEX_BY_DIMENSION : Object

Lookup table of dimension index by dimension label

Kind: static property of GATracker

GATracker.DIMENSION_BY_INDEX : Object

Lookup table of dimension labels by dimension index

Kind: static property of GATracker

GATracker.TRACKING_BRAND_ID : String

The GA tracking id of the site. This will be updated in the page template.

Kind: static property of GATracker

GATracker.TRACKING_CONDE_ID : String

The GA tracking id for CondeNast

Kind: static property of GATracker

GATracker.COMSCORE_PUBLISHED_ID : Number

Comscore id

Kind: static property of GATracker

GATracker.RE_SITE : RegExp

RegEx for brand site This isn't set because each brand should specify in the core

Kind: static property of GATracker

GATracker.REFERRERS : Object

List of referrer types

Kind: static constant of GATracker

GATracker.SEND_HITTYPES : Object

List of ga send hit types

Kind: static constant of GATracker

GATracker.SendAll(hitType, config)

Calls send on all the trackers

Kind: static method of GATracker

ParamType
hitTypeString
configObject

GATracker.SetAll(fieldName, value)

Calls set on all the trackers

Kind: static method of GATracker

ParamType
fieldNameString/Object
valueString/Number

GATracker.getDimensionByIndex(index) ⇒ String

Gets the dimension label by dimension index

Kind: static method of GATracker
Returns: String - The dimension label

ParamType
indexString

GATracker.getIndexByDimension(dimension) ⇒ String

Gets the dimension index by dimension label

Kind: static method of GATracker
Returns: String - The dimension index

ParamType
dimensionString

Prerequisites:

  • Node.jsbrew install node
  • Grunt - npm install -g grunt-cli
  • Other prereqs? Python? Virtualenv?

Demo:

Install dependencies:

npm install

Build the things:

npm run sass
npm run js
npm run docs

Hint your JS

npm run jshint

Python the pythons:

npm run demo-install

Start the demo server:

python demo.py

FAQs

Package last updated on 28 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc