Data Flow and Google Ads Optimization

This article explains the data flow between your server-side Google Tag Manager (sGTM) container, the Profit Tracking service, and Google Ads. It also covers how to leverage the calculated profit data to optimize your advertising campaigns for real profit, not just revenue.

Data Flow Diagram

The process begins when a purchase event is tracked on your website and sent to your sGTM container. From there, a custom tag forwards the event to the Profit Tracking API endpoint. The service calculates the profit and returns a new event, purchase_profit, which is then sent to your advertising platforms, such as Google Ads.

Data Flow for Profit Tracking
Data Flow for Profit Tracking

Step-by-step breakdown:

  1. Purchase Event: A user completes a purchase, and the standard purchase event is sent to your sGTM container.
  2. sTag Request: A custom server-side tag intercepts this event and sends a request containing the transaction details to the Profit Tracking API.
  3. Profit Calculation: The API uses the rules configured in your Profit Project to calculate the actual profit from the transaction. This includes subtracting the Cost of Goods Sold (COGS), order-level costs, and any other defined expenses.
  4. purchase_profit Event: The API responds to the sGTM tag with a new event, purchase_profit, where the transaction value is replaced with the calculated profit.
  5. Sending to Google Ads: The sGTM container then forwards this purchase_profit event to Google Ads as a conversion.

Optimizing Google Ads for Profit

By sending real profit data to Google Ads, you can shift your campaign optimization strategy from revenue-focused to profit-focused. This allows Google's bidding algorithms to prioritize conversions that are genuinely more profitable for your business.

Using purchase_profit as a Primary Conversion Goal

In your Google Ads account, you can set the purchase_profit event as your primary conversion goal for purchases. This tells Google Ads to optimize for the value associated with this event—the profit—rather than the original revenue.

Set purchase_profit as Primary Conversion Goal
Set purchase_profit as Primary Conversion Goal in Google Ads

Leveraging ROAS Bidding Strategies

With profit data as your conversion value, you can more effectively use Target Return on Ad Spend (tROAS) bidding strategies.

Target ROAS Bidding Strategy in Google Ads
Target ROAS Bidding Strategy in Google Ads

This strategic shift ensures that your advertising budget is allocated to campaigns that deliver the highest possible profit, leading to more sustainable and efficient growth.