Auto Bidding Based on First Party and External Data Sets
Introduction: Smart Bidding Is Not Always Smart
Smart Bidding in Google Ads is useful - until it is not. It is a general-purpose optimiser trained on general data, which often means it over-weights conversions that are easy to get, not necessarily profitable. If you have rich first party data - CRM stages, LTV, margin variation, refund history - then you already have more intelligence than Google does. The question is whether you are using it.
In this article, I show how I build auto-bidding logic that replaces or augments Smart Bidding using your own data. Whether in ecommerce or SaaS, I connect Google Ads to CRM or warehouse systems using the API, feed in structured revenue signals, and programmatically update campaign or ad group level bids based on what actually drives profit.
Feeding First Party Conversion Data Back Into Google Ads
By default, Google only sees conversions like signups or purchases. It does not see refund status, upsell, or contract churn. To close this loop, I regularly import offline conversions using the Google Ads API. I match conversions using the gclid
captured on click.
In a Ruby app using google-ads-ruby
gem, you can structure the upload like this:
conversion_action_id = 'INSERT_CONVERSION_ID'
client = Google::Ads::GoogleAds::GoogleAdsClient.new
service = client.service.offline_user_data_job
operations = [
client.operation.create_resource.offline_user_data_job do |job|
job.type = :STORE_SALES_UPLOAD_FIRST_PARTY
job.customer_match_user_list_metadata = {
loyalty_fraction: 1.0,
transaction_upload_fraction: 1.0
}
end
]
response = service.create_offline_user_data_job(
customer_id: '1234567890',
job: operations.first.create
)
The gclid
must be captured and stored at conversion time. I usually include it in the signup or purchase model in the backend, then enrich the conversion with LTV or refund flags before upload.
Bid Boosting Based on CRM Status or Product Usage
One client wanted to prioritise traffic that led to high-quality SaaS trials. But conversion tracking only reflected the initial signup. Using a CRM webhook (in this case, HubSpot), I triggered bid modifier logic once the lead reached a marketing qualified stage.
I used a small Python script to automate campaign-level bid increases via the Google Ads API:
from google.ads.googleads.client import GoogleAdsClient
from google.ads.googleads.errors import GoogleAdsException
client = GoogleAdsClient.load_from_storage()
campaign_service = client.get_service("CampaignService")
def update_bid_modifier(campaign_id, multiplier):
operation = client.get_type("CampaignOperation")
campaign = operation.update
campaign.resource_name = campaign_service.campaign_path("1234567890", campaign_id)
campaign.manual_cpc.enhanced_cpc_enabled = True
campaign.status = client.enums.CampaignStatusEnum.ENABLED
client.copy_from(campaign.manual_cpc, {"bid_modifier": multiplier})
operation.update_mask.CopyFrom(
client.get_type("FieldMask").FromJsonString("manual_cpc.bid_modifier")
)
campaign_service.mutate_campaigns(customer_id="1234567890", operations=[operation])
The key is synchronisation: every 24 hours, we poll the CRM, extract IDs that meet the behavioural trigger, and push updated bid values.
Adjusting Bids by Stock Levels and Margins
In ecommerce, the actual value of a sale depends on profit margin and inventory level. There is no point aggressively bidding on products that are low margin or nearly out of stock.
I work with clients to pipe stock data from Shopify, WooCommerce or ERP into a local margin table. I then calculate target CPC thresholds:
- High margin and high inventory: bid aggressively
- Low margin or low inventory: restrict bid
Sample logic in Python:
def calculate_bid_modifier(stock, margin):
if stock < 5 or margin < 0.2:
return 0.5
elif margin > 0.5 and stock > 20:
return 1.3
return 1.0
These modifiers are applied at the product group level using the Google Ads Shopping API. This creates a dynamic bidding layer where economics drive spend - not guesswork.
Final Thought: Build Your Own Brain
Smart Bidding is a one-size-fits-most solution. If you are serious about growth, and especially if you have access to better internal signals than Google does, it is time to take control.
I use structured automation and API-driven logic to tie real business signals - user behaviour, purchase quality, inventory state - to bidding outcomes. The result is higher profit per click, more stability, and far less waste.
If you want to build a bidding engine that actually understands your business, not just your clickstream, I can help you get started - with the logic, the code, and the integration path tailored to your stack.