Skip to content

Latest commit

 

History

History
94 lines (70 loc) · 1.9 KB

README.md

File metadata and controls

94 lines (70 loc) · 1.9 KB

pipz-tracker

pipz

Pipz Tracker is a zero-dependency library that includes tracking in your application.

Install

# With npm
npm install pipz-tracker

Usage

import pipz from 'pipz-tracker';

Create a .env file in the root directory of your project. Add environment-specific variables of Pipz Tracker API Key. For example:

REACT_APP_PIPZ_API_KEY=0123456789
PIPZ_API_KEY=0123456789

See more about API Keys, Events, Tracking, etc:

Event Tracking

Call tracking using sample script your pages:

pipz.track('Downloaded Ebook', {
      title: 'Growth Hacking 101',
      language: 'English',
      pages: '63',
      author: 'Pipz Automation'
});

Or in your button/action element:

<button onclick =
    "pipz.track('Downloaded Ebook', {
         title: 'Growth Hacking 101',
         language: 'English',
         pages: '63',
         author: 'Pipz Automation'
    });"
>Download ebook!</button>

Identify user:

pipz.identify('12345', {
        name: 'John Doe',
        email: 'joe@doe.com',
        job_title: 'Director of Sales',
        phone: '+1089647827'
});

Link user to company:

pipz.identify('12345', {
        name: 'John Doe',
        email: 'joe@doe.com',
        job_title: 'Director of Sales',
        phone: '+1089647827',
        company: {
            remote_id: 'johndoe123Company',
            name: 'JDoe LLC',
            website: 'www.iamjohn.com'
        }
});

In the example above, the unique identifier is 12345.

See more here.

Contributing Guide

See CONTRIBUTING.md

License

See LICENSE