0.3.5 • Published 5 years ago

react-tracking-taboola v0.3.5

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

React Tracking Taboola

Build Status dependencies Status devDependencies Status License: MIT

Un-official module to easily add Taboola pageview tracking to react apps. It functions as a tiny wrapper for the native script tag and window api. After initialization the Taboola script is injected into the document.

Installation

With npm:

npm install react-tracking-taboola --save

Usage

Before tracking any page views or events the tracker needs to be imported and initialized with the custom tracking id:

import TaboolaTracking from 'react-tracking-taboola';
TaboolaTracking.initialize('TRACKING_ID');

After initializing page views can be tracked like this:

TaboolaTracking.trackPageview();

There is also the option to track custom events with event action:

TaboolaTracking.trackEvent(eventAction);

There is also a method to expose the raw _tfa tracking object api from the window:

TaboolaTracking.getTracker();

How this works

This modules takes care of injecting the provider specific tracking script into the document and provides a tiny wrapper for the tracking api. It also exposes the tracker object api for direct access.

Documentation for the raw tracker api can be found here and here.

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago