Skip to main content
Skip table of contents

How to access all Active Ads from Google Ads Settings datasources

Overview

This guide will give an overview of how to access active ads from the new Google Ads Setting datasources that house accurate Google Ads data for each client.

What Problem is this solving?

The SEM team for a client was having issues getting the accurate active ads, ad groups, and campaigns from Alli Data Library. As it turns out, they were querying from the googleads_structure_* datasources which are deprecated. The googleads_settings_* datasources house the accurate Google Ads data for each client and should be used instead.

The googleads_structure_* datasources are deprecated and will be removed before Holiday 2022

Query to solve this issue

Run the following query from Alli Data Library raw datasources:

SQL
select distinct ad.ad_id, cm.customer_id, cm.campaign_id, adg.ad_group_id
from [client name].googleads_settings_ad as ad
join [client name].googleads_settings_adgroup as adg on adg.campaign_id = ad.campaign_id and adg.ad_group_id = ad.ad_group_id
join [client name].googleads_settings_campaign as cm on cm.campaign_id = adg.campaign_id
where lower(ad.ad_group_ad_status) = 'enabled' and lower(adg.ad_group_status) = 'enabled' and lower(cm.campaign_status) = 'enabled'

Sample Output

The image below displays the output when the above query is run for Momentive

This query at some point may become a default view within Alli Data Library.

JavaScript errors detected

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

If this problem persists, please contact our support.