analitiks

0.1.7 • Public • Published

analitiks

A 650b Google Analytics client for performance maniacs

This project is a non-official implementation of a Google Analytics JS client.

It does not uses cookies so is intendend only for projects that doesn't have strict requirements on user-tracking on Anlytics.

Installation

$ npm install analitiks

Usage

import { setup, trackPageView, trackEvent } from "https://cdn.skypack.dev/analitiks";
 
setup('UA-123456-1');
trackPageView();
 
document.getElementById('mybutton').addEventListener('click', () => {
    trackEvent('category', 'action', 'label', 1);
});

Anonymous mode!

This client supports also an anonymous mode where:

Example:

import { setup, trackPageView, trackEvent } from "https://cdn.skypack.dev/analitiks";
 
setup('UA-123456-1', true /* enables anonymous mode */);
trackPageView();
 
document.getElementById('mybutton').addEventListener('click', () => {
    trackEvent('category', 'action', 'label', 1);
});

Readme

Keywords

none

Package Sidebar

Install

npm i analitiks

Weekly Downloads

0

Version

0.1.7

License

MIT

Unpacked Size

3.11 kB

Total Files

3

Last publish

Collaborators

  • dorsi