Youtube Data Analytics API Targeted Query For CMS - youtube-data-api

Before accessing the Youtube API in a script I was using the try-it function for Targeted Queries. With the most simple params, I keep running into a 400 error.
Scopes:
Params (CMS name as both the URL and Name failed):
Errors:
I am a CMS with full admin privileges and I am a content owner.

For Youtube Targeted Queries, the dimensions and metrics must adhere to specific combinations outlined in the Content Owner Reports. I suspect using filters for more descriptive (but smaller) reports, and combining reports is a way to maximize on Youtube's rich dimension and metric offerings. Will post a follow up.

Related

Google Analytics Data API: missing flag for identifying `golden` data

I've been using such API for generating reports over Google Analytics:
https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/reports/batchGet
This API has result field isDataGolden:
Indicates if response to this request is golden or not. Data is golden when the exact same request will not produce any new results if asked at a later point in time.
Currently Google Analytics has new API for generating such reports:
https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/batchRunReports
But there is no analogue of isDataGolden field in this API
Question:
Is such flag will be added to new API, or maybe there is another instrument to get only golden data from new API?
p.s.:
I need to use this new API, since old one does not support new analytics properties without Universal Analytics view_id
The Google analytics data api is used for extracting data from google analytics ga4 accounts. The reporting api is used for extracting data from Universal analytics accounts. These are two different systems and should not be compared. You can not use the Google analytics data api to extract data from universal analytics accounts with view ids.
If you check the documentation for RunReportResponse which is the response returned from running a reporting in google analytics data. You will find that there is no is golden property or any property of that nature.
Remember this api is still in beta the team is still working on it. One may appear in the future. You will need to wait to find out if google will add any field like this in the future as anyone who would know is probably under NDA and cant tell you.

How to search for web and images results from Google Custom Search JSON API?

I'm implementing Google's Custom Search JSON API into my application which shall search for both web and images. I am able to query for web and images independently.
For web: https://www.googleapis.com/customsearch/v1?key=${key}&start=${start}&cx=${cx}&q=${searchVal}
For images: https://www.googleapis.com/customsearch/v1?key=${key}&searchType=image&start=${start}&cx=${cx}&q=${searchVal}
This works perfectly. However, as you can see, I have to make 2 separate requests to get the web results and the images for a single query value. This is an issue since it makes room for Google's search query quota to be exceeded. So, I need to find a way to make a single request which returns me both the web and image results for a particular search value. Any help or recommendation would be appreciated.

Why some performace fields from google ads api can't be together?

Ad Performance Report states that some fields are not compatible with the some fields such as ConversionCategoryName. It can't be together impressions, clicks, cost... etc.
However They can be show together in the same table on Google ads platform.
It is not always possible to compare results of the API and results of the web application. Googles web applications have different permissions then they give to developers.
If you are seeing compatible with the some fields such then you cant use that in the API there is no work around for that.

how to implement Complex Web API queries in ASP Core

I'm new to web API design, so I've tried to learn best practices of web API design using these articles:
1.Microsoft REST API Guidelines
2.Web API Design-Crafting Interfaces that Developers Love from "Apigee"
Apigee is recommending web API developers to use these recommendations to have better APIs.
I quote here two of the recommendations:
I need C# code for implementing these recommendations in my Web APIs (in ASP Core) which is a back-end for native mobile apps and AngularJs web site.
Sweep complexity behind the ‘?’
Most APIs have intricacies beyond the base level of a resource. Complexities can include many states that can be updated, changed, queried, as well as the attributes associated with
a resource.
Make it simple for developers to use the base URL by putting optional states and attributes behind the HTTP question mark. To get all red dogs running in the park:
GET /dogs?color=red&state=running&location=park
Partial response allows you to give developers just the information they need.
Take for example a request for a tweet on the Twitter API. You'll get much more than a typical twitter app often needs - including the name of person, the text of the tweet, a timestamp, how often the message was re-tweeted, and a lot of metadata.
Let's look at how several leading APIs handle giving developers just what they need in
responses, including Google who pioneered the idea of partial response.
LinkedIn
/people:(id,first-name,last-name,industry)
This request on a person returns the ID, first name, last name, and the industry.
LinkedIn does partial selection using this terse :(...) syntax which isn't self-evident.
Plus it's difficult for a developer to reverse engineer the meaning using a search engine.
Facebook
/joe.smith/friends?fields=id,name,picture
Google
?fields=title,media:group(media:thumbnail)
Google and Facebook have a similar approach, which works well.
They each have an optional parameter called fields after which you put the names of fieldsyou want to be returned.
As you see in this example, you can also put sub-objects in responses to pull in other information from additional resources.
Add optional fields in a comma-delimited list
The Google approach works extremely well.
Here's how to get just the information we need from our dogs API using this approach:
/dogs?fields=name,color,location
Now I need C# code that handles these kind of queries or even more complex like this:
api/books/?publisher=Jat&Writer=tom&location=LA?fields=title,ISBN?$orderBy=location desc,writerlimit=25&offset=50
So web API users will be able to send any kind of requests they want with different complexities, fields, ordering,... based on their needs.

Google Analytics - filtering out the traffic created by my bot

I built a website testing product that can be employed by Q&A and other teams. It is essentially a Chrome based robot that does all kind of queries to a target website.
I would like to give my customers an option to filter out the bot traffic from their Google Analytics using GA filters, or simply filter it out by default.
Restrictions:
No changes on the tested website required
It must be a product-wide solution (no exceptions for specific customers)
It should not alter any typical parameters (user-agent, screen size, java support, referral, ...), as these can be altered by the user in my product
It shouldn't require any Chrome plugins (such as GA opt-out)
Filtering cannot be IP based, as the product can be ran from anywhere at any time
I would like to avoid blocking GA objects from loading in the browser, as this can skew the test data
Ideally this would be implemented using something like a custom X- HTTP header or a custom cookie, but found no way to filter GA data based on that.
Any ideas how to approach that?

Resources