MemberMouse users build various methods for tracking, but the most reliable option is to use MonsterInsights. It's fully integrated with MemberMouse, has a great support team, and will adapt to any changes that the analytic providers often make. It's the best choice for those who do not have the developer support to maintain a custom-built tracking system.
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. The code below is only an example to guide you and it may require adjustments to meet your needs:
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>