Posts tagged with google-cloud-data-transfer

I have a problem setting up a data transfer from SA360 (the old api) to Big Query.

In SA 360 I've two subaccounts. I set up the data transfer for one sub-account without problems, and the data syncs to BigQuery.

The other sub-account causes an error:

PERMISSION_DENIED: Error from API in SendRequestReportRequest for table 'AccountStats'. Error code: conditionNotMet. Message: Permission denied: the SA360 user does not have read access to the report scope.

I'm an admin of both of sub-accounts and use the correct agency and advertising IDs.

Has anyone encountered a problem like this before? Any clues on how to solve the problem are appreciated.

I tried to spot the difference between the set-ups but there is nothing that would differentiate them apart from the agency id and advertising id.

I have a Google Ads account which has a single Smart Campaign and multiple usual campaigns. Also I've set up a data transfer to Google BigQuery. When I try to compare BigQuery data using the query

SELECT sum(Cost) FROM `project.dataset.AccountBasicStats_XXXXXX`  where Date between '2021-12-01' and '2021-12-31' 

the query result shows a less cost than I see in the Google Ads interface for the same time period. The difference is equal to the spend of my smart campaign. To check this, I've tried the queries:

SELECT * FROM `project.dataset.CampaignBasicStats_XXXXXX`  where Date between '2021-12-01' and '2021-12-31' AND CampaignId = {ID of my smart campaign} SELECT * FROM `project.dataset.CampaignStats_XXXXXX`  where Date between '2021-12-01' and '2021-12-31' AND CampaignId = {ID of my smart campaign} 

The both give me no results.

Is it true that BigQuery data transfer discards the data of smart campaigns? What are other ways to get statistics for them?

I have configured a Google Ads DataTransfer stream from Google Ads to my GoogleBigQuery project. It runs, data flows, everything is fine. But when I decided to build a query that return an amount of money spend in the context of distinct combination of utm_marks (source, medium, campaign) I've faced a trouble with 'doublicated' data.

So, the query firstly goes to Adstat Table and takes the stats of every creativeId (I suppose creativeId means Ad) in every campaignId. Then it takes an every utm_marks from AdTrackingUrlTemplate of every creativeId from every campaign. Finally it merges two tables in one and in the output I have a full info about stats for every utm_mark.

Query looks like this:

 with   Adstat as (             select *              from `myproject.GoogleAds.AdStats_7394379271`         ),  Ad as (         select              CampaignId,              CreativeId,              REGEXP_EXTRACT(CreativeTrackingUrlTemplate, r"[?&]utm_source=([^&]+)") as source,             REGEXP_EXTRACT(CreativeTrackingUrlTemplate, r"[?&]utm_medium=([^&]+)") as medium,             REGEXP_EXTRACT(CreativeTrackingUrlTemplate, r"[?&]utm_campaign=([^&]+)") as campaign         from              `myproject.GoogleAds.p_Ad_7394379271`         where              CreativeTrackingUrlTemplate is not null          and              CreativeTrackingUrlTemplate!="{lpurl}"         group by              CampaignId, CreativeId, source, medium, campaign        ) select     date, CampaignId, CreativeId, impressions,      Clicks, Cost, Cost * 1.2/1000000 as adCost, source, medium, campaign from      Adstat  left join       Ad using (CampaignId, CreativeId) where      date = '2021-11-26' and      CampaignId = 1688777252 and      CreativeId = 328994634699 

output:

date CampaignId CreativeId impressions Clicks adCost source medium campaign
2021-11-26 1688777252 328994634699 1 1 10 google cpc _cntr_sale_15
2021-11-26 1688777252 328994634699 1 1 10 google cpc cntr_sale_16
2021-11-26 1688777252 328994634699 1 1 10 google cpc cntr_sale_17

And there is a trouble. If a creativeId during its lifetime has a several utm_marks in AdTrakingTemplate, all of them will go to result and all of them will receive a stats from AdStats Table (you can see at in output: same date, same CreativeAd, same stats, but different utms). So we have a double (triple,quadriple) impressions, clicks, amount spent etc. It's a pretty common case, because it's easier from manager to change a tracking template, than create a new Ad or Campaign in Google Ads.

And, unfortunatly, I don`t know, how to figure it out, cause there no way to determ which exactly utm_marks were in createiveIdTrakingTemplate when some stat actcions (impressions, click, etc) were performed.

Does anyone know, how to deal with it? Thanks for help!

I have set up a google ads transfer into bigquery with a refresh window set at 30 days. I am aware that conversion-type statistics are continually updated within the lookback window, so I am not concerned about discord between the data pull and the UI for data within the last 30 days; however, there seems to be a difference between the UI and the data transfer for up to 10 days after the 30 day attribution window has ended. (ex. I schedule a backfill for 2020-04-29 on 2020-06-02. When comparing the UI and the bq data, on 2020-06-10, the bq data no longer matches the UI) Note: Backfill data that is older than 40 days, does not seem to have this issue.

Has anyone else experienced this issue? Any potential solutions?

This same question has been posted within the GCP slack community.