Learn how to build a reverse ETL pipeline in 10 min during our next live session. 🏎️💨 Register for free today
Census cheat sheets

Google Ads Quickstart

Google Ads targeting is complex. But it doesn't have to be. This quick start guide will show you how easy it is to set up Google Ads audiences with the SQL you write every day.

With Census, if you can define an audience in a query, you can advertise to it across Google Search, Google Display Network, Youtube, and Gmail. And best of all, the audiences are dynamic so as your query results change, so do the audience.

For many Census customers, this is the quickest path to new revenue but if you need some inspiration, we got you.

Eliminate waste. Reinvest in growth.

Let's keep it simple. Every dollar you save by avoiding low-value clicks can be spent on clicks from high-value audiences. With Census you can create audiences on both ends of the spectrums and everything in between.

  • Eliminating waste: If you are a SaaS business and every time an existing customer clicks your ad just to log in to your app, you've wasted money. And at scale, it adds up quickly! Syncing an app user list to Google Ads and excluding this audience from branded search terms keeps that money in your growth budget.
  • Grow your best customers: There is no better place to identify high-growth customers than the data warehouse. Web and app tracking provide superficial signals about customer behavior but the truth is in the warehouse. You can get creative and with custom segments in several ways:
  • Here's an example of some formatting to guard against those errors. Don't worry though, when you sync your audience, Census provides detailed line-by-line error reporting so you'll know how to fix any errors.
  • Here's an example of some formatting to guard against those errors. Don't worry though, when you sync your audience, Census provides detailed line-by-line error reporting so you'll know how to fix any errors.
  • Personalize your campaigns based on demographic and behavioral data

A practical example

Let's take the example of reactivating customers who have gone dark. You already know this type of email re-engagement campaign works great for this audience so you think maybe you can double down on it with the help of ads.

The question is, how do you define this audience? The definition is pretty simple: "give me every customer who hasn't purchased in the last 90 days." In other words...

SELECT *
FROM customers
WHERE last_purchase_date < CURRENT_DATE - 90

Now you have a dynamic audience and it was way too easy. Let's make it a little more targeted and create an audience of users who haven't purchased in the last 90 days, but have purchased in the last year and they have spent at least $1000.

SELECT *
FROM customers
WHERE last_purchase_date < CURRENT_DATE - 90
 AND last_purchase_date > CURRENT_DATE - 365
 AND total_value > 1000

Now you have a dynamic audience and it was way too easy. Let's make it a little more targeted and create an audience of users who haven't purchased in the last 90 days, but have purchased in the last year and they have spent at least $1000.

Testing and comparing audiences

If you have enough customers, you could even start testing and evaluating different audiences against each other. Let's build two audiences so we can compare their performance over time.

-- Audience A: Inactive whales
SELECT *
FROM customers
WHERE last_purchase_date < CURRENT_DATE - 90
 AND last_purchase_date > CURRENT_DATE - 365
 AND total_value > 5000

-- Audience B: Inactive normal sized fish
SELECT *
FROM customers
WHERE last_purchase_date < CURRENT_DATE - 90
 AND last_purchase_date > CURRENT_DATE - 365
 AND total_value BETWEEN 500
  AND 5000

With these two audiences, you have a benchmark for comparison. On top of that, you can refine your campaign bid based on performance and tune the ROI to your specifications.

The beauty of operational analytics is that you can analyze these audiences in the same place that you define them (the data warehouse). Just ETL your Google Ads data into your warehouse and add a column to these queries that evaluate their revenue during the window of time that they were in the audience.

Layering time-based audiences

Now, let's take a fun example and redefine data storytelling. Let's say you have several campaigns that you want to make sure that people see in a sequence. You want to build the narrative over time and make sure that you set the stage before the action starts.

-- Audience 1: Set the scene
SELECT *
FROM customers
WHERE last_purchase_date BETWEEN CURRENT_DATE - 30
  AND CURRENT_DATE - 60

-- Audience 2: Budding romance 
SELECT *
FROM customers
WHERE last_purchase_date BETWEEN CURRENT_DATE - 60
  AND CURRENT_DATE - 90

-- Audience 3: The proposal
SELECT *
FROM customers
WHERE last_purchase_date BETWEEN CURRENT_DATE - 90
  AND CURRENT_DATE - 120

With these time-based criteria you can gradually entice your audience with sweeter and sweeter deals... or gradually back off your bid and frequency. Let love be your guide!

Deploying your Google Ads audiences with Census

It's an easy process but because it's data integration, you have to do it right. Follow these steps to advertising success.

Step 1. Create an audience in Google Ads

First, head over to the Google Ads Audience Manager and click "Your Data Segments" and then click the big blue + button to start building an audience.

Google is kind of picky when it comes to creating audiences. Unfortunately, you can't just click a button to create an empty audience. Instead, you have to upload an empty CSV to define your audience and then connect Census to your empty audience. Here's an empty spreadsheet with the right columns to start with.

Keep the new audience List ID for later. You will use this in your query.

Step 2. Define your audience(s) in SQL

You probably already have some ideas about what audiences you'd like to create. So we'll focus on the formatting details in this section.

Google has very specific formatting guidelines but they aren't too crazy. Luckily Census takes care of the hashing for you so as long as you take care of the character and casing details, you're good to go. The big ones to look out for are any random spaces, uppercase characters in the first and last name, and the country code must be uppercase.

Here's an example of some formatting to guard against those errors. Don't worry though, when you sync your audience, Census provides detailed line-by-line error reporting so you'll know how to fix any errors.

The final column of the query, called audience_list_ids, is important. It is how you assign the individual contacts in your query to Google Ads audience lists. The data type is an array. This allows you to assign a contact to multiple groups.

For example, you might have a few contacts who are in the "Inactive Whales" audience and the "90-120 day dormant" audience. In that case, you'd have a value like array_construct(1234567890,0987654321).

-- Following the formatting guidelines
SELECT replace(lower(c.email), ' ') email,
 c.phone_number,
 lower(c.first_name) first_name,
 lower(c.last_name) last_name,
 upper(c.country_code) country_code,
 c.zipcode,
 array_construct(1234567890) AS audience_list_ids
FROM customers c

One thing you will have to watch out for is list size. The Google Display Network requires a minimum audience of 100. But that doesn't mean just because you came up with a query that returns 100 emails that Google will match all of them.

Match rate will inevitably reduce your audience size. As you probably guessed, Google is great at matching Gmail addresses but not quite as good with others.

Step 3. Create sync your model in Census

Getting started with Census is very well covered in our Docs so this section will be brief. Once you are happy with your query that returns your customer segments and the matching audiences, all you have to do is create a new model (paste in your SQL code or point Census to a pre-modeled table or view), set up a sync, and set a schedule. The schedule you choose will largely be dependent upon how frequently this audience changes.

Start big and iterate

The biggest favor you can do for yourself is to start with a big and relevant audience. This means you might want to sync your entire customer list to exclude them from some campaigns or build a broad lookalike audience. Starting big is not only easier because it requires less logic but it will also help you understand what match rates look like and give you a sense of how big your segments should be to create viably sized audiences.

Get started today

Hopefully, this guide has inspired your creative brain and challenged your analytical brain. If that's the case, there's only one thing to do—test this out with your own data!

You can do everything you see here for free on our free plan. Sign up for Census to get started!

Want some help getting started? Schedule a personalized consultation to get your stack connected.

From your data warehouse to your favorite apps. Without code or engineers.

Start using Census today by booking a demo with one of our experts.

Illustration of a data stack from multiple data sources.