moengage

0.1.3 • Public • Published

Moengage Events

Build Status

To include the web tracking js on your website please read https://docs.moengage.com/docs/overview.

Installation

Install the dependencies.

$ npm i moengage

Example

import Moengage from 'moengage';
const MoEvent=new Moengage({appID:"your key",debugMode:1,swPath:"./sw.js"})
 
 
//To Create unique user
MoEvent.createUniqueUser("uniqueID")
//To update unique user
MoEvent.updateUniqueUser("def")
//Destroy Session
MoEvent.destroySession()
 
 
// Track User Attribute - Add Event with multiple attribute
MoEvent.addEvent("event name",{name:"xyz",age:19})
 
//setCustomAttribute
MoEvent.setCustomAttribute("age",20)
MoEvent.setCustomAttribute("adjjk",'ghj')
 
//Pre-defined User Attributes - All attribute are optional
MoEvent.updateAttributes({name:"dsf",email:"dsfd@",mobile:"8980",addFirstName:"abc",addLastName:"sdf",addGender:"M",addBirthday:new Date(1980, 2, 31)})
 

License

MIT

Free Software, Hell Yeah!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    367
    • latest

Version History

Package Sidebar

Install

npm i moengage

Weekly Downloads

367

Version

0.1.3

License

ISC

Unpacked Size

7.53 kB

Total Files

4

Last publish

Collaborators

  • pldhiman