How To Add Negative Keywords to Google Ads
Overview
This Action allows you to automatically add negative keywords to your campaigns, based on text they contain or performance they’ve had. Useful for adding brand/nonbrand negative keywords for queries that come in via Broad/BMM keywords and adding negative keywords for poor performing queries coming in via Broad/BMM keywords.
Instructions
This Action uses the Add Negative Keywords Action Type
Set up your change logic
Login to Alli Data and select the client you want to create an action for
Navigate to Reports → Explorer and select New Data Report
Give your report a Name and update the Report Type to Custom Redshift
Copy and paste the SQL Example in from below and update anything within and including
{
}
to match your client settingsOnce your SQL is updated, click Publish to update the query
Click Preview to ensure the output is as expected
Create a new Action
Go to Alli Actions then select Create Action
Filter the Vendor column for Google Ads and select the Add Negative Keywords to a Campaign Action Type
Continue to the Configure screen and select your authenticated account
Click Next to set up and link where your changes are coming from, for this example that will be Alli Data
Insert your report name i.e. {client}.{view name you set in step 1-c}
Review your action setup
Save and Schedule your action to run
SQL Example
Login_customer_id
This corresponds to the MCC ID. If you don’t have MCC for your account, this line can be removed.
Ex: ‘{XXX-XXX-XXXX}’ becomes ‘012-345-6789’
Context for the WHERE section below:
This is where you choose campaigns to include or exclude from this action.
The way this is done is saying “campaign_name ILIKE '%TEXTHERE%'”.
The ILIKE means “contains” and is not case sensitive, it will match uppercase or lowercase.
The TEXTHERE piece is where you can put common pieces of your campaign names to identify which campaigns to select, such as “brand”, “nonbrand”, “retargeting”, etc.
That text needs to be surrounded by a tick ' on each side
The percent signs mean that it is looking for that text no matter what is before or after it in the campaign name.
Essentially using percent signs means “look for campaign names that contain this text”, not using percent signs would mean “look for campaign names that exactly match this text”
Example
ILIKE '%part%' will match to party & apartment
ILIKE 'part%' will match to party but not apartment
Date Selection
The section beginning with “date >=” is where you can choose a date span. All you need to edit is the end of the line in {NUMBER OF DAYS}, this will look for the today’s date minus the number of days you enter, so putting 30 there will look at one month of performance to determine what to add negatives for
query_match_type_with_variant
We’ve set this to broad and phrase so that you only add negatives for queries that matched on broad or phrase keywords so that negatives that contradict an exact match keyword aren’t added. You can remove either of these if you only want one.
CTR Threshold
We’ve set this example up to filter by CTR performance, but the same could be done for any other main KPI. At the very end of the query you will see “CTR < X”. Here you can enter your threshold for poor performance. The number should be entered as a decimal so entering “0.05” will look for any queries with less than 5% CTR.
Click Threshold
You can also assign a minimum clicks threshold to only look for queries that have served decent volume, so that we aren’t adding negatives for very low volume queries.
SELECT
'{XXX-XXX-XXXX}' as login_customer_id
account_id as customer_id,
campaign_resource_name,
campaign_name
search_query AS keywordtext,
'EXACT' AS keywordmatchtype,
CTR,
clicks
FROM
(
SELECT
account_id,
campaign_resource_name,
campaign_name
search_query,
sum(clicks) AS clicks,
sum(impressions) AS impressions,
sum(clicks)/nullif(sum(impressions),0) AS CTR
FROM {client}_core.search_sqr
WHERE
date >= convert_timezone('US/Central',SYSDATE)::DATE - {NUMBER OF DAYS}
AND
(
{campaign inclusions or exclusions}
Example:
campaign_name ILIKE '%brand%'
OR campaign_name ILIKE '%nonbrand%'
)
AND campaign_status ILIKE 'ENABLED'
AND
(
query_match_type_with_variant ILIKE 'broad'
OR query_match_type_with_variant ILIKE 'phrase'
)
GROUP BY account_id,
campaign_resource_name,
campaign_name,
search_query
)
WHERE CTR < {X}
and clicks > {X}
Related articles
- How To Handle Common Types of Actions Issues
- How To Filter Alli Data Reports by Date to Power Actions - Tips & Tricks
- How To Run an Action One-Off with Manual File
- How To Connect your Google Sheet to Actions
- How To Set Up a Manual Upload Action
- How To Test Your Action
- How To Schedule Your Action to Run
- How To Disable or Remove an Action
- How To QA Your Action Runs
- How To View Error Messages on an Action That Ran
- How Manage Partner Platform Authentication in Actions
- How-To Add Locations to Campaigns in Google Ads
- How-to Pause or Activate Meta (Facebook) Ads
- How To Add Negative Mobile Placements in Google Ads
- How To Add Negative Keywords to Google Ads