Skip to main content
Skip table of contents

How-To: URL and App Placement Negation (self-onboarding)

Note: This is the updated version of the setup.

TL;DR: What's different in the new setup?

The overall workflow stays the same—we're just switching the report type used to pull PMAX placements.

Previously, the Alli datasource pulled placements from a general Google Ads endpoint, which didn’t always return PMAX-specific placements. As a result, some teams couldn’t retrieve the placements they needed. Google has since introduced a new reporting API specifically for PMAX, and we're now transitioning to use that.

Technical changes

  • New to the tool? Follow the documentation from the beginning.

  • Already have a shared set of negations? You can skip steps 1 and 2

  • Already using the tool? You only need to revisit Step 4 and Step 5.

  • Also want to exclude app IDs? You just need to add Step 4b, Step 5b and Step 6b -

How it works

  • The URL Placement Negation Tool helps automatically exclude unwanted PMAX placements (like spammy websites or irrelevant app IDs) from your campaigns by leveraging Google Ads shared sets and the Alli platform. It connects data from Google Sheets, Google Ads APIs, and Alli workflows to identify, filter, and push exclusions into your ad account.

At a High Level:

  1. Store Shared Set Info:
    Use a Google Sheet to define your new shared set (or skip if one already exists).

  2. Create Shared Set via Alli Action:
    This step sets up the Shared Set in your Google Ads account using Alli.

  3. Pull Shared Set ID:
    Use an Alli Datasource to retrieve the shared_set_id required for later steps.

  4. Retrieve Existing Negations:
    Pull existing negated placements from your Shared Set to avoid duplicates - both for URLs and app IDs (optional).

  5. Fetch New PMAX Placements:
    Create a datasource and SQL report to identify placements you want to exclude, applying filters (e.g., excluding YouTube, Gmail, etc.). You can also fetch app IDs in a separate optional step.

  6. Push Negations to Google Ads:
    Use Alli Actions to upload the filtered placements (URLs and/or app IDs) into your Shared Set, completing the automation.

Setup time approximation: 15-20 mins

1. Create a Google Sheet that stores the details of your desired new shared set:

Purpose: This step begins the process of creating a new shared set on your account which will contain your negations, but you can skip this if you already have a shared set.

First, you will need to make a copy of this Google Sheet: https://docs.google.com/spreadsheets/d/1JJvPelEqGwg_UErYRnDABcPfhDeZ66v-BhV8ELI9M88/edit?gid=0#gid=0

Enter the login_customer_id and customer_id where you want the shared set to be created. Provide the desired name for the shared set, and keep NEGATIVE_PLACEMENTS in the type column for URL Placement Negation. Each row corresponds to a new shared set.

Example for Ralph Lauren:
I want to create a shared set for the Ralph account: Ralph Lauren PLA (947-853-2218)

Screenshot 2024-08-14 at 2.50.00 PM.png

The customer ID is the account id, so in this case, it will be 947-853-2218. And the Login-customer-id will be the Manager account id so in this case, it will be 782-628-8216.

Screenshot 2024-08-14 at 2.52.15 PM.png

I’ll name this shared set: Alli_Action_PLA_Placement_Exclusion_lists

Next, I’ll enter all this information into the Google Sheet as shown below::

Screenshot 2024-08-14 at 2.56.06 PM.png

Copy the URL for your Google Sheet, you will need it in a bit.

2. Create an Alli Action that creates the Shared Sets:

Purpose: This step creates the shared set in the platform that you named in Step 1. So, Alli Action will pick up the shared set name, account info from the Gsheet and create the shared set for you. This Alli Action will only need to run once for creating the new shared set, it will error out if you try to create the same shared set again in the same account.

Head to the Alli Action Site and click the blue button: Create Action

Screenshot 2024-08-14 at 3.01.01 PM.png

Search: Create Shared Set and click Select

Screenshot 2024-08-14 at 3.07.30 PM.png

Name your action and select an authenticated account with access to the Google Ads account where you want to create the Shared Set. Then click Next.

Screenshot 2024-08-14 at 3.13.29 PM.png

Select Google Sheets as your data origin, and paste the Google Sheet URL into the URL section. And click Save

Screenshot 2024-08-14 at 3.20.27 PM.png

It will bring you to this page and hit Publish

Screenshot 2024-08-14 at 3.30.30 PM.png

Click Run Now The action will run and create the shared set in the Google Ads platform.

Screenshot 2024-08-14 at 3.31.49 PM.png

Now that your shared set is set up, you can move on to the next step.

3. Set up Alli Datasource to pull you Shared Set ID

Purpose: This step creates the Shared Set ID using Alli Data that we will need in the following steps

First, you need a datasource that pulls the shared set ID for the shared set created in step 2 or a previously created shared set of your choosing.

Head to the Alli Data site, click Add New Dataaource

Screenshot 2024-08-14 at 3.45.11 PM 1.png

Search Google Ads and click on it

Screenshot 2024-08-14 at 3.48.31 PM.png

Give your datasource a meaningful name like shared_set_id:

Screenshot 2024-08-14 at 3.50.04 PM.png

Choose an account for authorization. The best is to use the reporting account. Click Next

Screenshot 2024-08-14 at 3.50.51 PM.png

Select the customer that your shared set is in, so in my example, I will pick the Ralph Lauren PLA (9478532218) account. For report type, select: Shared Set

Screenshot 2024-08-14 at 3.56.39 PM.png

In the Define your data section, select the following fields:

Screenshot 2024-08-14 at 3.57.55 PM.png

Finally, select a date range, if your shared set was created today, put today’s date in the date range and hit Load Data

Screenshot 2024-08-14 at 4.00.48 PM.png

It will take maybe a couple minutes to load:

Screenshot 2024-08-14 at 4.01.45 PM.png

You will get this message once it’s done:

Screenshot 2024-08-14 at 4.02.38 PM.png

You will now head to Explorer, create a New Data Report, and select Edit Custom SQL :

Screenshot 2024-08-14 at 4.03.59 PM.png

Query the datasource that you just created by filtering for the shared_set_name you are trying to update.
Then copy the id in the shared_set_resource_name:

Screenshot 2024-08-14 at 4.11.58 PM.png
CODE
select * from {CLIENT_NAME}.shared_set_id
where shared_set_name = {Share_Set_Name}

So in my example: customers/9478532218/sharedSets/9946398308 is the shared_set id that I will need.


4a. Set up Alli Datasource to pull existing PMAX Placements from Shared Sets

Purpose: This step ensures that existing negated placement urls in shared sets are retrieved, so you can avoid duplicating them when adding new exclusion

In Alli data again, Add New Datasource:

Screenshot 2024-08-14 at 3.45.11 PM 1.png

Select Google Ads:

Screenshot 2024-08-14 at 3.48.31 PM.png

Give it a name like shared_Set_placements:

Choose an account for authorization. The best is to use the reporting account. Click Next

Select the customer that your shared set is in, for report type, choose Shared Criterion:

In the Define your data section, select the following fields:

Finally, select a date range, if your shared set was created today, put today’s date in the date range and hit Load Data

Screenshot 2024-08-14 at 4.00.48 PM.png

It may take a couple of minutes to load

4b. Set up Alli Datasource to pull existing Placements from Shared Sets (App Id version) [Optional]

Purpose: If you want to also use app negated placements, complete this optional step to begin the process, as you retrieve your existing app id data

  • Repeat the same process as step 4a - creating a new datasource but with two minor changes

    • Give it a different name

    • Select the same report type

  • Instead of selecting “placement url” in the Define your Data, “Mobile Application App Id”


5a. Set up Alli Datasource to pull URL Placements

Purpose: create a datasource that pulls all the placement URLs that you want to negate in the shared set you have created

In Alli Data again, click Add New Dataaource

Screenshot 2024-08-14 at 3.45.11 PM 1.png

Search Google Ads:

Screenshot 2024-08-14 at 3.48.31 PM.png

Name it something like pmax_placement:

Choose an account for authorization. The best is to use the reporting account. Click Next

Select the customer accounts that contain your placement URLs. For example, I'll choose the Ralph Lauren PLA (9478532218) and Canada PLA (9925176198) accounts. If you have placements across multiple accounts you want to exclude, make sure to select all relevant ones.
For report type, select: Performance Max Placement View

In the Define your data section, select the following fields and click Save:

Select a date range and hit Load Data

Screenshot 2024-08-14 at 4.28.14 PM.png

Once the datasource has loaded, you will head to the Explorer page and create a new report in custom SQL. This new report will be the source of truth of placement URLs that you want to add to the shared_set.


In this step, you will the following IDs:
Customer ID, 9478532218 for Ralph
Login Customer ID, 7866298216 for Ralph
Shared Sets ID, 9946398308 which we retrieved in step 3.
Name of the Shared Set Placements datasource we created in step 4
In the SQL query, fill in the ID and report name accordingly.


In Ralph’s example, they want to add all the placement URLs that are “WEBSITE” and exclude everything that is coming from “Google”, “Gmail”, “Yahoo”, and “Youtube”.

We're also using the shared_set_placements datasource created in Step 4 to filter out existing placements from the shared set, preventing duplicate uploads.

CODE
select distinct placement_url, shared_set, customer_id, login_customer_id from 
  (SELECT performance_max_placement_view_placement AS placement_url,
          performance_max_placement_view_placement_type,
          'customers/{Customer_Id}/sharedSets/{Shared_Set_Id}' AS shared_set,
          '{Customer_Id}' AS customer_id,
          '{Login_Customer_Id}' AS login_customer_id
   FROM
     (SELECT DISTINCT performance_max_placement_view_placement,
                      performance_max_placement_view_placement_type
      FROM {CLIENT_NAME}.pmax_placement
      WHERE performance_max_placement_view_placement_type = 'WEBSITE'
        AND performance_max_placement_view_placement NOT ILIKE '%google%'
        AND performance_max_placement_view_placement NOT ILIKE '%gmail%'
        AND performance_max_placement_view_placement NOT ILIKE '%yahoo%'
        AND performance_max_placement_view_placement NOT ILIKE '%youtube%'))
        where placement_url not in 
        (select placement_url from {CLIENT_NAME}.{shared_set_placements_report_name}
            where customer_id = '{Customer_Id}'
            and shared_set_id = '{Shared_Set_Id}')


Give this report a name, save the report, and publish it. Have the report name ready, you will need this in our final step.


5b. Set up Alli Datasource to pull App ID Placements [Optional]

Purpose: this step gets the existing app id placements from your pmax placement report

- to add app ids to the exclusion list, all we have to do is create another report with the following SQL

CODE
select distinct performance_max_placement_view_placement as mobile_app_id, 
'customers/{Customer_id}/sharedSets/{shared_set_id}' AS shared_set, 
'{Customer_Id}' AS customer_id,
'{Login_Customer_Id}' AS login_customer_id 
from {client_slug}.pmax_placement 
where performance_max_placement_view_placement_type = 'MOBILE_APPLICATION' 
and performance_max_placement_view_placement not in 
(select mobile_application_app_id) from {CLIENT_NAME}.{shared_set_placements_report_name}
            where customer_id = '{Customer_Id}'
            and shared_set_id = '{Shared_Set_Id}')

Give this report a name, save the report, and publish it. Have the report name ready, you will need this in our final step.

Now to the final step:

6a. Set up Alli Action to send Placement URLs to the Shared Set

Purpose: this step adds the new url negations in platform, from the data you have pulled into Alli

Head to the Alli Action Site and click the blue button: Create Action

Screenshot 2024-08-14 at 3.01.01 PM.png

Search: Add Negative URL to Shared Set and click Select

Screenshot 2024-08-14 at 4.49.07 PM.png

Give your action a name, and select an authenticated account that has access to the Google Ads account that you are trying to update the Shared Set. Click Next

Screenshot 2024-08-14 at 4.52.16 PM.png

In the SET DATASOURCE section, select Alli Data and the name of the report will be the report that you created in the previous step:
In my example, it will be pmax_exclusion_placements

If you want the action to run immediately hit Run Now, or you can also set up a schedule for it to run Weekly or Daily. You can set this schedule up in the REVIEW ACTION section

Screenshot 2024-08-14 at 5.04.09 PM.png

Now your URL Placement Negation is set up.

if you also want to upload the placement ids that you created in steps 4b and 5b, complete the following step



6b. Set up Alli Action to send Placement App Ids to the Shared Set [Optional]

Purpose: this step adds the new app id negations in platform, from the data you have pulled into Alli

  • If you chose to complete 5b, then repeat same process as step 6a with 2 minor changes:

    • Search: Add Negative App Id to Shared Set and click Select

    • Give your action a new name

    • In the SET DATASOURCE section, select Alli Data and the name of the report will be the report that you created in the previous step (5b)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.