migueesc123 / YoutubeAnalytics

A Microsoft Data Connector or Power Query Connector for YoutubeAnalytics data
MIT License
61 stars 21 forks source link

Youtube Analytics API #16

Closed scofeeeld closed 5 years ago

scofeeeld commented 6 years ago

Hi Miguel! Thanks for great job of Youtube Analytics connector. But I've got a problem: on the google pages there is notification that after 31-of October API will be deprecated and there is some instructions to migrate. When I try to change request url from https://www.googleapis.com/youtube/analytics/v1/reports on https://youtubeanalytics.googleapis.com/v2/reports the Power BI is adding one more "/" in request address image

This is a guide https://developers.google.com/youtube/analytics/migration#updating-client-library-code Kindly ask you to help me cause it has very big impact to me

scofeeeld commented 6 years ago

I just afraid that if I ll be use old version (v1) API it will not work after update to v2

migueesc123 commented 6 years ago

Hey! would you mind sharing the documentation about this?

scofeeeld commented 6 years ago

Hey! Yeah of course. This is a guide for migration https://developers.google.com/youtube/analytics/migration This is a guide about new query for reproting https://developers.google.com/youtube/analytics/reference/reports/query

Please help me to improve your connector to ensure correct work with new API

scofeeeld commented 6 years ago

How can I avoid additional "/" in the end of request url when I'm using new version API and new link https://youtubeanalytics.googleapis.com/v2/reports ?

scofeeeld commented 6 years ago

UPD: I could form good format of request URL but it doesn't work image

and when I was trying to fill it in browser I got the next error image

migueesc123 commented 6 years ago

hey! thanks for reporting this. I'll be allocating some time during the next few weeks to make the proper changes and support the API v2. Thanks again!

scofeeeld commented 6 years ago

YoutubeAnalytics.zip

Hey! If you can ask me asap it will be great. I could migrate your code but when I'm trying to use some functions I get an error;

  1. DailySubscribers: It can't transform null type to List image

  2. VideoStats There are a lot of erros image

I attached my version of .m script. Please assist asap. Thank you

migueesc123 commented 6 years ago

Hey,

Thanks again for reporting this. I haven't had the chance to review your code, but I've started to work on mine based on the documentation that YouTube provides. I'm getting the same errors that you're getting and the reason behind those errors is that YouTube is not sending data for some videos (because they don't have data), so it just sends the metadata of the fields queried, but there are no rows of data. I've updated the code, but I'm on a testing period with some of my users to figure out if things are working correctly or not. I'll commit the new and updated connector once it passes all the tests.

Thanks!

migueesc123 commented 6 years ago

Hey Savvin,

I made the commit of the latest solution. It appears that the API v2 has some bugs for the queries that I'm running, specifically for the dailysubscribersgained and lost by video, date and country. It no longer brings information when the Country filter is added which is pretty strange since the previous version of the API did not have this issue. Do you happen to know if this is a known issue?

scofeeeld commented 6 years ago

Hi! I also was changing your code and the first step was clearing additional filter for countries as you said. I found this error firstly and when I was changing your code I have cleared all functions with error except for videostats, get report and countries and it works.

I don't know is this issue known or not but I have a question to you. Does it connector support scheduled refresh?

migueesc123 commented 6 years ago

Hey! Please refer to this thread: https://github.com/migueesc123/YoutubeAnalytics/issues/15#issuecomment-422519250