0.0.5 • Published 3 years ago

tracie v0.0.5

Weekly downloads
35
License
MIT
Repository
github
Last release
3 years ago

Tracie (client)

Tracie is a self-hosted event tracking service written in NodeJS. This is a client library, used to create events and send them to your hosted server. Supported on either NodeJS and browser enviroment.

_Note: Usage on NodeJS and browser is slightly different__


Install and Usage on Browser

On browser, embed the tracie distribution script, and use

1. Embed distribution script

// Add tracie client
<script src="path/dist/index.min.js" />

// Or using jsdelivr (you can replace `latest` with a version)
<script src="https://cdn.jsdelivr.net/npm/tracie@latest/dist/index.min.js" />

2. Usage

// Initate connection
tc.initiate({ server: "{serverpath}" });

// send event
tc("event_name");

document.onload = function() {
    tc("hits")
}

Install and Usage on Webpack (es5, es6, ...)

You'll need to install tracie and node-fetch

1. Install

# using yarn
$ yarn add tracie node-fetch

# using npm
$ npm install tracie node-fetch --save

2. Usage

// Import using require
const Tracie = require("tracie");

// Or import in ES6
import Tracie from "tracie";

const tc = new Tracie({
    server: "{serverpath}"
})

// Add an event
tc.add("event_name");
0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago