YouTube Analytics API returns no rows for demographic query - but does return views - youtube-api

When querying the YouTube Analytics API for demographics for a channel for a 1 day range (metric:viewerPercentage, dimensions:ageGroup,gender) in some cases no rows are returned. The api IS returning views for that day however.
2 reasons for this come to mind:
1. The data is not available yet because it is still being processed.
2. There is no known demographics for that (i.e. the gender and age of the user are not known)?
Am I safe to assume it's not (1) in this case because a query for views did return results? If I can't assume on then is it true that there's no difference in the response/results between "not processed" and "processed but all users are of unknown demographics?"
In other words if, when (2) were the case, the API would return a row with all zero's 0 for each demographic, that would enable us to interpret things correctly (but I'm pretty sure that's not how API queries with a dimension work).
Thanks for any guidance!

I can't provide any hard-and-fast guidance about the YouTube Analytics data processing pipeline, i.e. whether the demographic data will always be available at exactly the same time that the view count data is available in a report.
To get a more authoritative answer about this sort of specific question, I'd recommend going to the YouTube Analytics web interface (http://youtube.com/analytics) and try running an identical report from there. The web interface normally gives you some warning if you're requesting a report that relies on data that isn't yet available.

Related

YouTube API "mostPopular" requests doesn't seem to give updated results

It seems that the YouTube API doesn't give updated results for mostPopular videos in my country since few days.
Example:
This request (https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails&chart=mostpopular&regionCode=FR) doesn't give me the same videos results than the ones displayed directly on YouTube for the French most popular channel (https://www.youtube.com/channel/UCmzy72gDEpfXoFV9Xdtd0DQ). It seems that the results of this request is not updated since the 1th of february. Results was real time updated before this.
Does someone know if something is wrong with my API request, or if there are some issues with the YouTube API at this moment?
There is nothing wrong with your request. This is a known issue with the YouTube API reported here for Saudi Arabia (but also applicable to multiple regions), and another related issue here with regard to content from France.
Your best bet would be to follow up with the YouTube team on one of those defects, or potentially (and dangerously) scrape the YouTube site for the correct results.
Problem seems to be solved since 13th of february (maybe someone from Google have seen my post..)
YouTube Channels and chart=mostPopular parameter data are separate data entities, aka you will get different results. They may be related but there is no guarantee you will get the same data. To get the data that you want you may need to query for channel itself and its videos.
I got this information from the thread #Jal linked, there was an update by matthewc...#google.com a few days ago:
The most popular channel for Saudia
Arabia and
the mostPopular chart parameter in the video.list
call
are separate and distinct entities. If you'd like to get the content
of the most popular channel for Saudia
Arabia
please use the Data API video.list call to list the videos with the
channel ID (in this case "UCWY-_j1MCth6yf24m58Bh_Q") by setting the
items/snippet/channelId parameter.
My current concern right now is that there is supposedly a way to get video information from the videos.list endpoint using a channelId, which does not seem the case in the API Explorer. I will update my answer once I figure out what this person meant exactly.

How to check data sent to Omniture/adobe-analytics is correct or not

I am a beginner to Omniture/adobe web analytics. I want to know the some information like
How can we track data coming into Omniture?
How do we know if the tags are firing as expected?
I installed Omnibug extension and can track what are the parameters and their values being sent to Omniture, but not sure how can we track data in Omniture that was being sent.
Also, I tried to find unique visitors, visits, pageviews based on pageName. Is it possible to filter unique visitors based on pageName? If yes, can anyone guide me by providing list of instructions
Thanks
What you need to do to truly verify that the expected data is landing in Adobe Analytics is look at the Click Stream feeds and map the results against the data you expect to be there. https://marketing.adobe.com/resources/help/en_US/sc/clickstream/
It is not trivial, but is the deepest way of verifying the final result of page code, data collection, processing rules, vista and finally pre/post results.

Not able to see time zone, place or geolocation of any tweets

I am following two tutorials right now and both are up and running and I've gotten plenty of tweets/sentiment scores from them:
1) Twitter Stream Analytics on Azure https://azure.microsoft.com/en-us/documentation/articles/stream-analytics-twitter-sentiment-analysis-trends/
2) Twitter Analysis with Spark Streaminghttp://ampcamp.berkeley.edu/3/exercises/realtime-processing-with-spark-streaming.html
I am using the free oauth tool provided from apps.twitter.com.
Problem
I've tried getPlace, getGeoLocation in the Spark Streaming app and every tweet I get has a null value for those two fields. I have tried filtering for tweets that only have values for getPlace, get GeoLocation and I get null for both (I ran the app for almost 20 minutes).
I've also tried getting TimeZone in the Azure app (so I can get some sort of geography data) and even then I kept getting null values for TimeZone.
Possible Obstacles
1) Does the free twitter api filter out the place/geoLocation information so I end up buying a subscription to a better api?
2) Do I need to explicitly search for tweets that have geoLocation/Places? Rather than getting all tweets and then filtering out ones that have geoLocation/Places? If so, can I execute this search in Spark Streaming?This is the code that I have in Spark Streaming:
val stream = TwitterUtils.createStream(ssc, None, filters)
val hashTags = stream.map(status => Tweet(status.getPlace().getName(), classifyTweet(status.getText())))
Thank you for the help!
I've personally used the free Twitter api to get locations and publish them on a a map on PowerBi. So you can rule out the first obstacle.
One thing to note is that location field is only available if the client specifically allows the application to have location, which renders it quite rare to be found. The ratio for data with location in my sample data was about 8%.
Don't have an answer for spark side, just wanted to help you rule out the first possibility.
Hope this helps.

Rails current visitor count

How does one implement a current visitors count for individual pages in Rails?
For example, a property website has a list of properties and a remark that says:-
"there are 6 people currently looking at this property" for each individual listing.
I'm aware of the impressionist gem, which is able to log unique impressions for each controller. Just wondering if there is a better way than querying
impressions.where("created_at <= ?", 5.minutes.ago).count
for each object in the array.
Before you get downvoted, I'll give you an idea of how to do it
Recording visitors is in the realm of analytics, of which Google Analytics is the most popular & recognized
Analytics
Analytics systems work with 3 parts:
Capture
Processing
Display
The process of capturing & processing data is fundamentally the same -- put a JS widget on your site to send a query to the server with attached user data. Processing the data puts it into your database
Displaying The Data
The difference for many people is the display of the data they capture
Google Analytics displays the data in their dashboard
Ebay displays the data as x people bought in the past hour
You want to show the number of people viewing an item
The way to do this is to hard-code the processing aspect of the data into your app
I can't explain the exact way to do this, because it's highly dependent on your stack, but this is the general way to do it

Obtain analytical data for a specific video within a date range

So after scouring the youtube API, and thinking that this may not be possible, I'll give a last try here.
In a nutshell, I am trying to obtain analytical data from youtube's analytics's API for specific videos for a date range (by day if possible). I've found ways to get the channel data that the video reside in, but I have been unable to find how to ontain the specific video data itself. Assuming it exists in v3 that is.
Anyone had any luck with this kind of task at all? Has this feature been developed for v3 as of yet?
Channel Reports is the API to retrieve video metrics. It can filter by video, by country, by lead (for some fields) and accepts timespan and data aggregation granularity. In brief, Available Reports lists all the valid query parameter combinations.
Individual comments can be retrieved with v2 Data API - together with their dates.

Resources