Agentis integrates with GA4 to overlay traffic acquisition costs onto per-order margin data — revealing which channels, campaigns, and sources drive profitable orders vs. revenue-positive but margin-negative traffic.
Agentis reads GA4 session and attribution data via the Data API to connect traffic sources to individual orders. When combined with ad spend data from Google Ads, Meta, and other platforms, Agentis calculates the customer acquisition cost per order and includes it in the all-in margin calculation. A $50 order from a paid Instagram ad with a 15% discount and $12 CPA has a very different margin than the same order from organic search.
Agentis uses the GA4 Data API (v1beta) with Google OAuth2 authentication (analytics.readonly scope). We query the runReport endpoint to extract session source, medium, campaign, and transaction data. Order matching uses the transaction_id parameter from GA4's ecommerce events, cross-referenced with Shopify order IDs. Ad spend data is pulled from the Google Ads API and Meta Marketing API where connected. Data syncs daily (GA4 processing latency is 24-48 hours). Attribution modeling supports last-click, first-click, and GA4's data-driven attribution.
Not directly — GA4 data has 24-48 hour processing latency. However, Agentis uses historical channel-level margin data to apply estimated acquisition costs at checkout. For example, if paid social orders average $8 CPA, Agentis applies that estimate to checkout margin calculations for traffic identified as paid social.
No. Agentis complements GA4 by adding margin data that GA4 doesn't have. You continue using GA4 for traffic, behavior, and conversion analytics. Agentis adds the profitability layer.
You choose. Agentis supports last-click, first-click, and GA4's data-driven attribution model. Most merchants start with last-click for simplicity and switch to data-driven once they have sufficient volume.
Solution
Get a single view of profitability across Shopify, Amazon, and wholesale channels. Agentis enforces per-channel profit floors with live cost data from your ERP.
Solution
Stop invisible margin erosion from stacked promos, influencer codes, and free shipping thresholds. Agentis enforces profit floors at checkout for DTC brands on Shopify Plus.
Margin Analysis
Real-time visibility into per-order, per-SKU, and per-channel profitability using live data from ERP, logistics, and FX systems.
Margin Analysis
The revenue remaining after deducting all variable costs associated with fulfilling an order — including COGS, shipping, payment processing fees, and pick-and-pack labor.
Margin Analysis
The gradual, often undetected loss of profit across many orders — driven by small per-order cost overruns that compound into significant revenue erosion over time.
Free Audit — No Commitment
See exactly how much margin Agentis can recover for your store in 7 days — no commitment required.