Bigquery - get data from other Google APIs - google-bigquery

I'm working with google BigQuery and Google Calendar API.
I want to integrate between the two. I mean, I want to write a query that gets data from the calendar API. How can I do that?
Something like:
SELECT * FROM `my_table`
LEFT JOIN `data from google calendar api` AS cal_data
ON my_table.date = cal_data.date
Is that possible?
I can't find anywhere documentation for this...
My only solution is to get the data from the api and upload it as a table to bigquery.
But I would like to automate this process.

Related

Google Calendar API - How to create a Calendar without duplicates

I would like to create a script in python that creates specific calendar in python for each user with Google Calendar API, I don't know how to to check if the calendar already exists, I don't know if I have to make an excel list with the name and id of the user or if there is an easier way..

How do I get my google account data with API?

I would like to know how i can get my google account data directly with an API.
More precisely , I would like to get the result of "my list" with an API/endpoint call.
I know it is possible in a browser to just go to "https://www.google.com/save", But i don't know hos to get it with an API.
Regards,

How to retrieve Performance MAX campaigns Google Ads into Google Big Query

I am using a third-party tool that use the Adwords Reporting https://developers.google.com/adwords/api/docs/appendix/reports/all-reports to retrieve data.
At the moment all the "Performance Max" campaigns are lost from the Adwords Reporting and I need to retrieve them to include their costs.
With the migration from Adwords to Ads, also, I need to find a solution before April 2022.
I only need to move that data into my Google BigQuery project.
At the moment the solution using the BigQuery Data Transfer is NOT OK because use the same v201809 reporting of Adwords ( https://cloud.google.com/bigquery-transfer/docs/adwords-transfer?hl=en-GB )
.
Also the Google Ads Script don't support Google Ads but only report name of Adwords v201809 ( https://developers.google.com/google-ads/scripts/docs/solutions/bigquery-exporter )
Do you have a suggestion to help me?
Thanks
You have several options and the solutions depends on level in which you want to report data. On campaign level you can fetch data about impressions, clicks and cost from Google Analytics API if you have connected ads and analytics accounts.
If you want more granular information you can create report in google ads and schedule downloads of this report, for example everyday. Only problem is that performance max campaigns combine multiple types of ads, so on some dimensions you can get no data, for example campaign spend 50 eur yesterday, but in report with product id this campaign spent only 25. I combine this two sources, it isn't ideal, but better than total blindness now days.
Remember: Do not select an AdGroup when querying Performance Max campaigns, as no campaigns will be returned.
https://developers.google.com/google-ads/api/docs/performance-max/reporting
Solution --> I use two different GAQL :
one FROM ad_group for the details needed with the ad_groups resource
another FROM campaign without any ad_group in the SELECT

Is there a way to get a report of Landing Pages in Google Ads via the Google Ads API, Scripts or BigQuery Data Transfer Service?

I am currently in the process of creating an overview of ad spent per landing page/destination url.
We are using several campaign types:
Shopping
(Responsive) Search Ads
Dynamic Search Ads
I am struggling to get a report per landingpage for each campaign type. We have multiple Customer Ids and I would need data for all Customer Ids. When looking at the Google Ads API documentation I think I would need these two reports to get all I need
Keywordless Query Report (for Dynamic Search Ads landing pages): https://developers.google.com/adwords/api/docs/appendix/reports/keywordless-query-report
Landing Page Report (for Shopping and (responsive) search ads landing pages): https://developers.google.com/adwords/api/docs/appendix/reports/landing-page-report
Ideally, the data would be uploaded to a BigQuery dataset.
What I have tried:
I have set up a BigQuery Data Transfer (https://cloud.google.com/bigquery-transfer/docs/adwords-transfer). This contains a lot of reports but not the two reports listed above.
I have tried a Google Ads script, but my knowledge of that is too little to write a script that woudl give the same/similar results as the two reports listed above. Next to that I would need help getting this data in my BigQuery project.
Solved it.
There is a Google Ads Script which requires minimum adjustments to fulfill my needs:
Single Account: https://developers.google.com/google-ads/scripts/docs/solutions/bigquery-exporter
Manager Account: https://developers.google.com/google-ads/scripts/docs/solutions/adsmanagerapp-bigquery-exporter
I simply had to change the:
BIGQUERY_PROJECT_ID
BIGQUERY_DATASET_ID
list of reports (I only needed "LANDING_PAGE_REPORT")

Get Google Analytics data source uploads with API

Is it possible to get data from Google Analytics data source via API with a given id?
I use uploadData to upload data to GA: https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtReference/management/uploads/uploadData
After uploading i get some response like accountId, customDataSourceId, id, status and uploadTime. With this information i want to grab informations from GA to use it for a end to end test.
If you want to check that the upload itself went well, you can use the List method from the management API.
If you want to check that data you uploaded is properly being mapped inside GA, you should use the reporting API and query for whichever dimensions you uploaded.