@moengage/web-sdk
TypeScript icon, indicating that this package has built-in type declarations

2.55.1 • Public • Published

Logo

Moengage Web SDK

This is the npm package of the origin SDK. Please refer the documentation for full details here

Installation

Install the dependencies.

$ npm i @moengage/web-sdk

Example

import moengage from '@moengage/web-sdk';

moengage.initialize(
  {
    app_id: 'XXXXXXXXXXXX',
    debug_logs: 0
  }
);

moengage.identifyUser({
  uid: 'abc@xyz.com',
  u_mb: '8989898989',
  u_fn: 'some name',
});

// don't use this and the above methods (identifyUser) together in your program. use only one of them.
moengage.add_unique_user_id('an_identifier');

moengage.add_email('qwerty@xyz.com');

moengage.track_event('Add to Cart', { name: 'Phone', price: '100000' });

moengage.destroy_session();

License

MIT

/@moengage/web-sdk/

    Package Sidebar

    Install

    npm i @moengage/web-sdk

    Weekly Downloads

    4,973

    Version

    2.55.1

    License

    MIT

    Unpacked Size

    17.8 kB

    Total Files

    4

    Last publish

    Collaborators

    • moengage-dev
    • moerishabh
    • moengagecordova
    • adityachawla
    • sachinhavalemoengage
    • mrinmay
    • balajisetti
    • amol-moe
    • akmoe
    • aldrin-moe
    • nawaz-moengage