Sync Purchase Data
How to submit your purchase data to MIME
One way MIME's AI learns and continues to get smarter is by getting input from customers all around the world after they purchase a recommended product.
Purchase data is sent from your website at checkout to MIME via a webhook.
Custom Webhook Method
Documentation is available here: https://mimepublic.docs.apiary.io/#reference/0/webhooks-purchase/save-a-user-purchase
Get your staging credentials from MIME and set as staging environment variables
Integrate the webhook at checkout
Test on staging and confirm the purchase data saves to MIME correctly
Prepare for production; add your production keys from MIME to environment variables
For more information please contact onboarding@getmime.com to get your API Client Key and Secret.
Google Tag Manager Integration Method
First, define the URL where you can send the purchase data. Store it as a custom GTM variable: mime - endpoint and reference it in the image pixel src (below):
You'll store the referring *mime_cid* and *mime_rid* in a cookie when the customer comes back to your PDP with the correct shade pre-selected.
Then on the purchase conversion event, trigger a custom image pixel using your custom GTM variable mime-endpoint as defined above. This sends the information via URL GET request to our servers:
Shopify Webhooks Method
Log in to your Shopify store and go to this link: {YOUR STORE NAME HERE}.myshopify.com/admin/settings/notifications
Go to the Webhooks section
Create a new Webhook
Choose "Order Creation" for the Event
Choose "JSON" as the Format
Enter this URL into the URL field: https://api.getmime.com/webhooks/updatePurchaseShopify/?client_user={YOUR CLIENT ID HERE}
Choose 2021-07 as the Webhook API Version
Click Save
There should be a code provided which is used to verify the integrity of the Webhook. This code will look like a long string of random letters and numbers. Please share that code with your MIME onboarding team member.
Last updated