Shopify Integration

1. Get your shop URL

Find your shop url in the url bar of the browser when are on the admin page of your Shopify account. The shop URL looks something like MY-SHOP-NAME.myshopify.com

1552

2. Go to install URL

Once you've obtained your shop URL, proceed to https://shopify-integration.moengage.com/shopify?shop=MY-SHOP-NAME.myshopify.com

🚧

Make sure you replace MY-SHOP-NAME.myshopify.com with the url you obtained in step 1.

3. Go to Shopify Admin and click on "Online Store"

1552

4. Select on "Themes" on left sidebar and click on "Customize"

1552

5. Go to "Theme Settings" at the bottom left corner and click on "Edit Code"

1552

6. Edit the theme

Select the file theme.liquid and add the following piece of code just before the </head> tag:. Make sure you replace you replace YOUR-APP-ID with the App Id you get on MoEngage Dashboard.

<script type="text/javascript">
  (function(i,s,o,g,r,a,m,n){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','add_user_name','add_gender','add_birthday','destroy_session','add_unique_user_id','moe_events','call_web_push','track','location_type_attribute'],h={onsite:["getData"]};for(k in f){t[f[k]]=q(f[k])}a=s.createElement(o);m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m);i.moe=i.moe||function(){n=arguments[0];return t};a.onload=function(){if(n){i[r]=moe(n)}}})(window,document,'script','https://cdn.moengage.com/webpush/moe_webSdk.min.latest.js','Moengage')

  Moengage = moe({
    app_id:'YOUR-APP-ID',
    debug_logs: 0,
    swPath: '/tools/moengage/sw.js',
    swScope: '/'
  });
</script>
1552