E-commerce Analytics: AI Optimizes Exactly What You Show It

3 quick wins to help the AI knows what a good sale looks like for you: sync GA4 with your ERP in 72 hours, complete the server-side signal, and optimize for profit margin, not revenue. If your “thank you” page registers a purchase every time someone reloads it, the algorithm learns that your best customer is someone who reloads pages. Using that example, Ariel Bortz, COO of Known Online, explained in our webinar“More Sales. More Profitability. Less Waste” why e-commerce analytics is no longer just a technical issue.

Google, Meta, and TikTok already use the data they receive to determine audience, bid, and budget. If that data is inaccurate, they optimize incorrectly—and with complete confidence. That’s why we start with the signal: if measurement fails, any improvements to ad targeting, placement, or frequency are made blindly.

E-commerce Analytics: Three Measurement Mistakes That Cost Almost Every Account Money

E-commerce Analytics
  • Conversions that don’t exist. Duplicate purchases, test events, or the confirmation page reloading. ROAS is inflated, and the platform scales something that isn’t selling.
  • Conversions you don’t see. Rejected cookies, Safari, and ad blockers hide actual sales. Without a server-side signal, the platform penalizes the channels that are actually driving sales.
  • The wrong metric. Optimizing for revenue treats an SKU with a 10% margin the same as one with a 50% margin. The algorithm doesn’t know which one is best for you.

According to data published by Google, enabling Enhanced Conversions increases the median conversion rate by 5% on Search and 17% on YouTube. Additionally, Consent Mode recovers more than 70% of the click-to-conversion paths lost due to a lack of consent.

Quick Win 01 · Reconcile GA4 with the ERP in 72 hours

Low effort · High impact

  • Download the daily order and revenue data from GA4, Google Ads, Meta, and the ERP.
  • Compare the four sources, day by day.
  • If the discrepancy exceeds 5%, there is a data discrepancy that needs to be corrected.

When the discrepancy reaches 15% or 20%, you are most likely either sending orders to the platform that never existed or failing to send orders that actually occurred. In both cases, the algorithm learns from incorrect data.

The metric is the percentage of ERP orders visible in GA4, and the goal is 100%. At Known Online, we automate this using GA4 Tools, an agent that compares the sources every morning and explains any discrepancies. This way, the platform records, for example, a purchase made by a customer who browsed using Safari and was blocked from being tracked.

Quick Win 02 · Complete Server-Side Signal

Medium effort · High impact

Server-side measurement sends the signal from the server, rather than relying solely on the client’s browser, which may be blocked by ad blockers, Apple restrictions, or security tools. It is an industry-standard implementation and requires three elements:

  • Conversions API alongside Pixel, on Meta and TikTok.
  • Enhanced Conversions and Consent Mode v2 on Google.
  • Deduplication by event_id, to avoid counting the same conversion twice.

We implement server-side tracking and monitor cross-platform matching, which we measure using Event Match Quality. In 15 A/B tests published by Meta, adding the Conversions API to the Pixel reduced the cost per result by 13%.

Quick Win 03 · Optimize for margin, not revenue

Medium effort · Very high impact

This action requires business data, which is why it’s often the one that gets put off the most.

  • Calculate the gross margin by SKU or by category.
  • Submit it as a conversion value (it can be an index).
  • Bid by target value based on that number.

To do this, we built a buffer layer from the ERP to the feed and the conversions. The data travels on the server side and is not published in the data layer, because it is private business information. The metric shifts from ROAS to POAS: gross profit divided by investment.

E-commerce Analytics

In this illustrative example, Campaign A has an ROAS of 8x with a 15% margin, and Campaign B has an ROAS of 5x with a 45% margin. Campaign B has a 37% lower ROAS but generates 6.25 times more profit after the ad run. If the platform only looks at revenue, it shifts the budget toward Campaign A. If it looks at margin, it shifts it toward Campaign B. The exception is when the immediate goal is to generate cash flow: in that case, revenue takes precedence.

E-commerce Analytics: From the Monthly Report to the 7:00 a.m. Agent

E-commerce Analytics

With the data organized, the next step is an agent who checks the advertising schedule, inventory, website, and ERP system daily—all at once—without waiting for the end of the month. This agent compares data that an eCommerce Manager has historically found difficult to compare: active investment versus out-of-stock products, and conversion rates versus each change published on the store. Here are some examples of the types of alerts it generates:

  • Active listing for out-of-stock SKUs. Action: Exclude them from the feed.
  • Drop in mobile conversion after a change, because the shipping step doesn’t load in Safari. Action: Revert the change or fix the checkout.
  • The gap between GA4 and the ERP is widening because purchases made with a digital wallet do not trigger the purchase event. Action: Review the tag.

The agent proposes the action and its estimated impact, and the team approves it. For it to work, it needs to integrate with your systems, which is possible in most cases. We summarize it this way: “AI doesn’t replace the e-commerce manager. It replaces their misinformed intuition.”

The full recording of the webinar is available here.

If you’d like us to review your analytics, at Known Online we implement e-commerce analytics : tagging audits, server-side tracking, and a margin layer connected to your ERP. Contact us.

Before asking the AI to invest more effectively, make sure it knows what you sold.

Frequently Asked Questions About E-commerce Analytics

What gap between GA4 and the ERP is acceptable?
A discrepancy greater than 5% indicates a data leak. The goal is for 100% of the orders from the ERP to be visible in GA4.

What is server-side tracking?
It’s the process of sending conversion events from the e-commerce server to the platforms, without relying solely on the user’s browser, which can block them.

What is POAS?
It is gross profit divided by advertising spend. It measures the profit margin generated by every peso spent on advertising.

Is it safe to send the profit margin to Google or Meta?
Yes. It’s sent server-side as a conversion value (it can be an index rather than the actual margin), without exposing it in the public data layer.