YouTube Analytics
با مجموعهها، منظم بمانید
ذخیره و دستهبندی محتوا براساس اولویتهای شما.
ایجاد گزارش برای یک کانال
function runYoutubeAnalyticsReport() {
// Get the list of all channels.
var myChannels = YouTube.Channels.list('id', {mine: true});
// Pick the first available channel.
var channel = myChannels.items[0];
var channelId = channel.id;
// Set the dates for report.
var today = new Date();
var oneMonthAgo = new Date();
oneMonthAgo.setMonth(today.getMonth() - 1);
var todayFormatted = Utilities.formatDate(today, 'UTC', 'yyyy-MM-dd');
var oneMonthAgoFormatted = Utilities.formatDate(oneMonthAgo, 'UTC',
'yyyy-MM-dd');
// See https://developers.google.com/youtube/analytics/v1/reports for
// supported dimensions and metrics.
var analyticsResponse = YouTubeAnalytics.Reports.query(
'channel==' + channelId,
oneMonthAgoFormatted,
todayFormatted,
'views,likes,dislikes,shares',
{
dimensions: 'day',
sort: '-day'
});
console.log(analyticsResponse);
}
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-09-23 بهوقت ساعت هماهنگ جهانی.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"اطلاعاتی که نیاز دارم وجود ندارد"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"بیشازحد پیچیده/ مراحل بسیار زیاد"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"قدیمی"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"مشکل ترجمه"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشکل کد / نمونهها"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"غیره"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"درک آسان"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"مشکلم را برطرف کرد"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"غیره"
}]
{"lastModified": "\u062a\u0627\u0631\u06cc\u062e \u0622\u062e\u0631\u06cc\u0646 \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc 2024-09-23 \u0628\u0647\u200c\u0648\u0642\u062a \u0633\u0627\u0639\u062a \u0647\u0645\u0627\u0647\u0646\u06af \u062c\u0647\u0627\u0646\u06cc."}
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2024-09-23 بهوقت ساعت هماهنگ جهانی."]]