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!

    Install

    npm i moengage

    DownloadsWeekly Downloads

    37

    Version

    0.1.3

    License

    ISC

    Unpacked Size

    7.53 kB

    Total Files

    4

    Last publish

    Collaborators

    • pldhiman