spy-web-client

0.0.2 • Public • Published

Build Status

spy-web-client

client-side library for recording events to spy-server

Installation

npm install --save spy-web-client

Usage

  • livescript:
{record} = (require! \spy-web-client) do 
 
    # properties included in every recorded event
    common-event-parameters: ->
        user-id: window.user-id 
 
    # url where the spy-server is hosted
    url: \http://localhost:3010/yourProjectName 
 
window.add-event-listener \load, ->
    record do 
        event-type: \page-ready
  • javascript:
var spy = require("spy-web-client")({
 
    // properties included in every recorded event
    commonEventParameters: function(){
        return {
            userId: window.userId
        };
    },
    
    // url where the spy-server is hosted
    url: "http://localhost:3010/yourProjectName" 
 
});
 
window.addEventListener("load", function(){
    spy.record({eventType: "pageReady"});
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    0
  • 0.0.1
    1

Package Sidebar

Install

npm i spy-web-client

Weekly Downloads

1

Version

0.0.2

License

none

Last publish

Collaborators

  • furqan.zafar