This guide helps you monitor all your campaign performances in one place using Campaign Analytics, especially if your main goal is to generate orders for your e-commerce store. You can easily compare campaigns based on the most important conversion goal—the number of orders.
By integrating your Google Analytics 4 (GA4) data with OptiMonk's Campaign Analytics, you’ll get a clear view of how your campaigns are performing based on actual order data from GA4. This makes it easier to track and optimize your campaigns for maximum impact.
Here's what we'll cover:
- Setting up GA4 order data to show in OptiMonk's Campaign Analytics
- Identifying the name of your order event
- Troubleshooting why your order data might not be appearing in Campaign Analytics
Setting up GA4 order data to show in OptiMonk's Campaign Analytics
OptiMonk differentiates between three scenarios when capturing order events, based on what your order event is labeled and how it is sent to GA4:
- Default 'purchase' event in the default format: OptiMonk captures all relevant data, including the number of orders, revenue, and Average Order Value (AOV).
- 'Purchase' event in a non-default format: OptiMonk captures the number of orders but won’t display revenue or AOV details.
- Custom event name (not 'purchase'): OptiMonk cannot track the order event. You will need to set up a Custom Conversion Event to track it.
Important reminder: The Campaign Analytics dashboard updates every hour.
How to identify your order event name
To find out the name of your store's order event, follow these steps after making an order:
- During the process of making an order, open the Inspector tool in your browser.
- Complete the order.
- Go to the Console tab and enter
dataLayer
. - This will display a list of all events triggered during your visit.
- Look for the event related to a purchase or order and note its exact name.
Troubleshooting missing order data in Campaign Analytics
Missing AOV and/or revenue data
OptiMonk’s Campaign Analytics tracks all order events labeled ‘purchase’ in GA4, even if they don’t follow the default format. This means we can capture and display order data regardless of how the purchase information is sent. However, if your purchase event doesn’t follow the default format, Campaign Analytics will only display the number of orders, while revenue and Average Order Value (AOV) data will not be available.
Missing order data
If your order data isn't appearing in Campaign Analytics, the issue might stem from your event name. If the event tracking your orders is named differently from the default "purchase," Campaign Analytics won't automatically recognize it. To resolve this, you'll need to
- either rename your order event or
- create a Conversion Goal based on your thank you page. However, in this case, you’ll see your order data on you campaign detail page, but not in Campaign Analytics.
Default event formats recommended by Google:
1. Using gtag function (reference)
<script> gtag("event", "purchase", { transaction_id: "T_12345_1", value: 30.03, tax: 4.90, shipping: 5.99, currency: "USD", coupon: "SUMMER_SALE", items: [ // If someone purchases more than one item, // you can add those items to the items array { item_id: "SKU_12345", item_name: "Stan and Friends Tee", affiliation: "Google Merchandise Store", coupon: "SUMMER_FUN", discount: 2.22, index: 0, item_brand: "Google", item_category: "Apparel", item_category2: "Adult", item_category3: "Shirts", item_category4: "Crew", item_category5: "Short sleeve", item_list_id: "related_products", item_list_name: "Related Products", item_variant: "green", location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo", price: 10.01, quantity: 3 }] }); </script>
2. Using dataLayer.push function (reference)
<script> dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ event: "purchase", ecommerce: { transaction_id: "T_12345", // Sum of (price * quantity) for all items. value: 72.05, tax: 3.60, shipping: 5.99, currency: "USD", coupon: "SUMMER_SALE", items: [ { item_id: "SKU_12345", item_name: "Stan and Friends Tee", affiliation: "Google Merchandise Store", coupon: "SUMMER_FUN", discount: 2.22, index: 0, item_brand: "Google", item_category: "Apparel", item_category2: "Adult", item_category3: "Shirts", item_category4: "Crew", item_category5: "Short sleeve", item_list_id: "related_products", item_list_name: "Related Products", item_variant: "green", location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo", price: 10.01, quantity: 3 }] } }); </script>
Comments