Shopify (E-Com Platform) - V2

Introduction

Shopify <> Moengage integration allows you to seamlessly integrate Moengage Web SDK to your brand's shopify store to track user events and user data . You can use channels web push, on-site messaging, SMS, Email, web personalisation, to reach out to your store visitors to nudge them towards converting. 

A limited set of data is tracked automatically by the MoEngage Shopify app. 

Integration prerequisite 

Option to add a shopify integration can only be possible after submitted the shopify integration form. Please ask your Customer success manager(CSM) to fill it for you.  

Once filled successfully with all the required details you will receive an installation link that can be used to install our shopify app into your shopify store. The installation link are only valid for 7 days so please reach out to regenerate the installation link if it goes stale. 

Authenticate and install app

 

Admin only

  • Ensure you have Shopify Store Admin credentials.
  1. Click on the received installation link or paste the link in the browser address bar and click enter. 
  2. In the Shopify window, enter your Shopify credentials to log in to your Shopify portal.
  3. Click the Install app button.
    moengage-test-store.myshopify.com_admin_oauth_request_grant_access_change_uuid_1aacb054-0ad2-4e48-a149-2c9a1b1486f0_client_id_32fb20fdc13f7398582bc54356bb657a__2_.png

Data Tracking

Select which data and events to track

Screenshot_2022-02-23_at_7.57.17_PM.png

Select the data and events and click on Save to start tracking these user attributes and events automatically by MoEngage. These attributes and events will only be tracked for users visiting your store after installing the app. 

The data tracking page is the home page of the app. Access the home page from Shopify admin portal -> Apps -> MoEngage 2.0

 

 

INFORMATION

If you are changing the Shopify Theme, then you have to visit this Config page again and click on Save button.

 

 

INFORMATION

You can also track any other data using our Data tracking APIs by writing the code directly into your store apart from the following user events and user attributes. For more information, refer to Web SDK User Attributes Tracking and Web SDK Events Tracking

User Events

Event Name

Properties Description

Page Viewed

  • URL

Tracked when a user visits the web page.

Product Viewed

  • Available - True/False

  • Currency

  • Product Handle

  • Product ID

  • Price

  • Product Title

  • Total Variants

  • URL

  • Source : Shopify

Tracked when a user views a product.

Product

Searched

  • URL
  • Currency

  • Search String

  • Source : Shopify

Tracked when a product is searched.

Add To Cart and Update Cart

  • URL
  • currency

  • Image URL

  • Product Price

  • Product ID

  • ProductType

  • Quantity

  • Product Title

  • Product URL

  • Variation ID

  • Variation Title

  • Vendor name

  • Source : Shopify

Tracked when a product is added to cart or the cart is updated.

Removed from Cart

  • URL
  • currency

  • Image URL

  • Product Price

  • Product ID

  • ProductType

  • Product Title.

  • Product URL

  • Variation ID

  • Variation Title

  • Vendor name

  • Source : Shopify

Tracked when a product is removed from cart.

Customer Registered
  • Email
  • FirstName

  • LastName

  • Customer ID

  • URL
  • Source : Shopify

Tracked when a customer registers with the Shopify store.

Customer Logged In

  • Email

  • FirstName

  • LastName

  • Customer ID

  • URL
  • Source : Shopify

Tracked when a customer logs in to the Shopify store.

Customer Logged Out

None

Tracked when a customer logs out of the Shopify store.

Checkout Started

  • Product quantity

  • currency
  • Total Price
  • Product Price (Array)
  • Product ID (Array)
  • Product Title (Array)

  • Variation ID (Array)

  • Vendor name (Array)
  • URL
  • Source : Shopify

 

Order placed

  • Order Id

  • Image URL (Array)

  • Product Price (Array)

  • Product ID (Array)

  • Quantity (Array)

  • Product Title (Array)

  • Variation ID (Array)

  • Variation Title (Array)

  • Vendor name (Array)

  • TotalItems

  • currency

  • Total Price
  • URL
  • Source : Shopify

Tracked when a customer successfully completes the purchase .

Item Purchased

  • Order Id

  • Image URL

  • Product Price

  • Product ID

  • Quantity

  • Product Title

  • Variation ID

  • Variation Title

  • Vendor name

  • currency

  • URL
  • Source : Shopify

Tracked for each item purchased when the order is placed.

User Attributes

Attribute Name Description
First Name First Name of the user.

LastName

Last Name of the user.

Mobile Number

Mobile Number of the user.

 

Email

Email address of the user.

Client ID

Id of the user in MoEngage (Email ID by default)

Shopify Tags

Tags used for the user by Shopify.

Accepts Marketing

Shopify attribute 

Orders Count

Number of orders placed by the user.

LTV

Life Time Value of the user. This is the total sum of revenue present in the App Conversion Goal event performed by a user. LTV is updated every time the app conversion goal event is executed by the user.

Shopify Id

Id of the user in Shopify.

Migrating to V2

If you have Moengage SDK already installed in you Shopify store and you want to install the new version, then follow the following steps:
1. Uninstall the Moengage app: Shopify admin portal -> Apps -> Moengage

2. Remove the SDK code from theme.liquid file: Shopify admin portal -> Online Store -> Actions -> Edit Code -> theme.liquid

<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'
});
</script>
{% include 'moe.liquid' %}

bc3c010-4_ed.png

Next Steps

After integrating with Shopify, you can:

Was this article helpful?
0 out of 0 found this helpful