Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src
.gitignore
.npmignore
CHANGELOG.md
LICENSE
README.md
gulpfile.js
index.js
jest.conf.json
package.json

README.md

@ima/plugin-analytic

This is the abstract analytic plugin for the IMA.js application. You can visit our site imajs.io.

Installation

npm install @ima/plugin-analytic --save
// /app/build.js

var vendors = {
	common: [
		'@ima/plugin-analytic'
	]
};

/*
Now is the analytic plugin available as:

import { events as AnalyticEvents, AbstractAnalytic } from '@ima/plugin-analytic';
*/

Implementing analytics in v2.0

The createGlobalDefinition method is renamed to _createGlobalDefinition and set as protected. LOAD event is fired only once.

Implementing analytics in v1.0

Since version 1.0 all analytics implement deferred loading of analytic scripts. Initialization was splitted into 2 methods.

  • init() - initializes global variables that mock analytic before it's loaded. This method should be called as soon as possible in your loading sequace.
  • load() - actually loads the analytic script and executes every hit that has been made until this method call. This method should be called at the end of your loading sequence.
You can’t perform that action at this time.