Basic Integration

STEP 0 - Adding eMMa SDK files to your project

EMMA is easy to setup in your project. You only need to follow these points:

1.  Add Library Files into your project:

<script src="https://in.emma.io/develKits/MobileWeb/EMMA-SDK-2.0.min.js" type="text/javascript"></script>

2.  Add dependencies.

Dependencies:

  • jQuery (v1.11 or higher)
  • Google Maps (if you want the trackLocation feature)

STEP 1 - Import Library

Add next lines to yourto include the EMMA and dependencies libraries.

<!-- Add this line only if your website doesn't include the GoogleMaps API -->
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<!-- Add this line only if your website doesn't include the jQuery library -->
<script src="http://code.jquery.com/jquery-2.1.0.min.js" type="text/javascript"></script>
<!-- Add this line, after all the dependencies where linked -->
<script src="https://in.emma.io/develKits/MobileWeb/EMMA-SDK-2.0.min.js" type="text/javascript"></script>

STEP 2 - Init Session

Add in your code at the beginning of execution the following code.

EMMA.starteMMaSession("YOURSESSIONKEY");

You can get your SessionKey from your App info. Just go to My Account > Support and create your App (if you did not do it before) and get your Session Key right there. Easy!

Also EMMA is not real time, a delay of 1 hour can occur to see your data. Take this delay into account.

STEP 3 - Get SDK version

You can use the following method to check which version of EMMA is currently being used.

EMMA.getSDKVersion();

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.