Shopify Webhooks
Instead of using the Google Analytics Ecommerce code or the Manual Revenue Tracking code to capture revenue on your store, you can use the Shopify Webhook method we provide below.
Shopify webhook is a feature that allows a website to notify other systems when events arise. For example, when you create a new order, it will help other systems can actively take information from CRM when data arises. In particular, webhooks can also store those data.
With webhooks, you will receive push notifications when an event occurs. You will not need to probe the API to determine whether these events have occurred or not. Webhooks allows you to provide a URL for the webhook provider to send requests to.
This method of tracking revenue conversions is more robust than the manual revenue tracking method of creating a Revenue Goal that tracks the "Thank you" page. The reason is that is actually triggered when an order is created, rather than when a visitor visits the thank you page.
Create a Revenue Goal in your Convert account
Go to goals and select the template Revenue Goal:
Add your Goal name and select either Manual Revenue Tracking or GA since it does not matter. Write down the Goal ID since you will use it in the next step:
Add code to your Global Project Javascript
Add this JS code to the "Global Project Javascript". Be sure to update the revenue_goal_id in the code below with the own you created in the previous step:
See the Pen Revenue via Shopify Webhook by Convert.com (@gcrewe) on CodePen.
Configure a webhook using the Shopify admin
You can configure your webhook using the Shopify admin. From your Shopify admin, go to Settings > Notifications.
After you've created the webhook, you are presented with a secret to validate its integrity. You can also test it.
Access your Convert Report
You will start receiving revenue data in your report:
Comments