@mailbiz/javascript-tracker

0.1.10 • Public • Published

Mailbiz JavaScript Tracker

npm version License

Add Mailbiz Tracking to your website via a tag solution.

Maintainer quick start

Part of the Mailbiz JavaScript Tracker monorepo.
Build with Node.js (12 LTS or 14 LTS) and Rush.

Setup repository

npm install -g @microsoft/rush 
git clone https://github.com/Mailbiz/Mailbiz.Tracker.Javascript.git
rush update

Select your version

This repository creates two versions of the tracker.

The fully featured tracker.js contains the majority of the plugins included within this repository for a complete tracking experience.

Installation

Add the tag to your website or Tag Management solution:

<script type="text/javascript" async=1>
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalMBZNamespace=p.GlobalMBZNamespace||[]; p.GlobalMBZNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","{{URL to tracker.js}}","mbtrack"));
</script>

<script>
window.mbtrack('newTracker', 'sp', collector_endpoint, {
  appId: 'my-app',
  eventMethod: 'post',
  contexts: {
    performanceTiming: true,
  },
});
</script>

We advise you host tracker.js yourself, and rename it. However if you'd like use a CDN, you'll find the tracker on jsDelivr, unpkg and cdnjs.

Usage

window.mbtrack('enableLinkClickTracking');

window.mbtrack('trackPageView', {
  title: 'My Title'
});

Licensed and distributed under the BSD 3-Clause License (An OSI Approved License).

Copyright (c) 2022 Mailbiz.

All rights reserved.

/@mailbiz/javascript-tracker/

    Package Sidebar

    Install

    npm i @mailbiz/javascript-tracker

    Homepage

    bit.ly/sp-js

    Weekly Downloads

    3

    Version

    0.1.10

    License

    BSD-3-Clause

    Unpacked Size

    798 kB

    Total Files

    58

    Last publish

    Collaborators

    • thiago.pitta.mailbiz
    • topogigiovanni