MoEngage Docs

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

SDK Integration

To include the web tracking js on your website, copy the following code and put it in the <head> tag. Replace "APP ID" with the one that you find in the settings page of MoEngage Dashboard.

<script type="text/javascript">
i['moengage_object']=r;t={}; q = function(f){return function(){(i['moengage_q']=i['moengage_q']||[]).push({f:f,a:arguments});};};
f = ['track_event','add_user_attribute','add_first_name','add_last_name','add_email','add_mobile',
for(k in f){t[f[k]]=q(f[k]);}
i['moe']=i['moe'] || function(){n=arguments[0];return t;}; a.onload=function(){if(n){i[r] = moe(n);}};

Moengage = moe({
app_id:"APP ID",
debug_logs: 0

Integration via GTM

Paste the above Javascript code as a Custom HTML Tag inside GTM. This Tag can be fired once per page where you wish to track user properties/behaviour. Kindly replace the app_id field with the right one that can be found in settings page of MoEngage Dashboard.


In case you are taking your website live, do ensure to pass debug_logs: 0 parameter in Moengage initialization in HTML code as mentioned below to send website data to LIVE environment on Dashboard (top toggle switch on Dashboard to right).
Moengage = moe( { app_id: "YOUR_APP_ID", debug_logs: 0 });

What's Next

You can now choose to set up web push or track user data.

Setting up Web Push
Tracking Events

SDK Integration