fbpx

Google eCommerce Tracking

MemberMouse users build various methods to do tracking, but the most reliable option is to use MonsterInsights. It's fully integrated with MemberMouse, has a great support team, and will flex to any changes that the analytic providers often make. It's simply the best choice.

If you prefer to build your own tracking system, you can use the Confirmation Core MemberMouse page, also known as the Thank You page, to provide the data to push to analytics. Order Data SmartTags can be placed within any coding you use to provide the necessary info to push. Although this may require tweaking to meet your needs, here is an example to help get you started:

1. Follow the instructions in this Google article to enable eCommerce tracking:
https://support.google.com/analytics/answer/1009612?hl=en#Enable

2. When you've set everything up that Google needs, you'll add a tracking code to the confirmation page where you want the tracking to happen as described in this Google article:
https://support.google.com/tagmanager/answer/6107169

3. You'll replace the hard-coded data with Order Data SmartTags as follows:

<script>
gtag("event", "purchase", {
    transaction_id: "[MM_Order_Data name='id']",
    affiliation: "Site Name",
    value: [MM_Order_Data name='total' doFormat='false'],
    shipping: [MM_Order_Data name='shipping' doFormat='false'],
    currency: "USD",
    coupon: "[MM_Order_Data name='couponCode']",
    items: [
     {
      item_id: "[MM_Order_Data name='productId']",
      item_name: "[MM_Order_Data name='productName']",
      affiliation: "Site Name",
      coupon: "[MM_Order_Data name='couponCode']",
      currency: "USD",
      discount: [MM_Order_Data name='discount' doFormat='false'],
      price: [MM_Order_Data name='subtotal' doFormat='false'],
      quantity: 1
     }
    ]
});
</script>
Was this article helpful?

Related Articles

Can’t find the answer you’re looking for?

Reach out to our Customer Success Team
Contact us!