Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Repository files navigation

metrix.js

Install

$ yarn

Development

$ make run

This will start the metrix debug application at ./src/debug running on http://localhost:4000/

Usage

// Pressly app version in the form ':platform-:version' - for example,//// blue suede: 'webapp-v4.6.0'// native mobile: 'mobile-v5.0.0'// embed: 'embed-v2.0.0'letAPP_VERSION='webapp-v4.6.0'// Metrix is thet tracker that will send events to the Pressly API (SERVER_HOST).letPMXif(__SSR__){PMX=newMetrixNoop(SERVER_HOST,APP_VERSION)}else{PMX=newMetrix(SERVER_HOST,APP_VERSION)}window.PMX=PMX// Track events in your application, in the form: event(MODULE, EVENT, PAYLOAD)// See src/proto.js for a list of supported modules and events.PMX.track.event('HUB','VIEW',{hub_id:1})PMX.track.event('HUB_SPOTLIGHT','VIEW',{hub_id:1,post_id:1})

Distribution build

$ make dist

see distribution build at dist/metrix.js

About

Pressly Metrix JS tracker

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages