با مجموعهها، منظم بمانید ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
می توانید از Data API برای دسترسی برنامه ریزی شده به داده های گزارش Google Analytics (Google Analytics) استفاده کنید. این API با ویژگی های قدیمی Universal Analytics سازگار نیست.
در اینجا چند نمونه وجود دارد که ممکن است در مورد استفاده از Google Analytics Data API v1 گزارش دهید:
اپلیکیشن اندروید شما در هفته گذشته چند کاربر فعال روزانه داشته است.
10 صفحه برتر سایت شما در 28 روز گذشته چند بازدید از صفحه داشته اند.
اپلیکیشن iOS شما در 30 دقیقه گذشته چند کاربر فعال در هر کشور داشته است.
همچنین می توانید از Google Analytics Data API v1 برای انجام کارهای زیر استفاده کنید:
داشبوردهای سفارشی برای نمایش داده های Google Analytics بسازید.
وظایف گزارش گیری پیچیده را به صورت خودکار انجام دهید تا در زمان صرفه جویی کنید.
داده های Google Analytics خود را با سایر برنامه های تجاری ادغام کنید.
شروع کنید
برای شروع، به شروع سریع کتابخانه مشتری مراجعه کنید. کتابخانه های کلاینت در جاوا، پایتون، Node.js و سایر زبان ها برای ساده سازی پیاده سازی شما وجود دارد.
روش های موجود
در اینجا لیستی از روش های Data API آمده است. برای جزئیات بیشتر، به مستندات مرجع مراجعه کنید.
runReport این روش یک گزارش سفارشی از دادههای رویداد Google Analytics شما را برمیگرداند و روش ترجیحی برای درخواستهای گزارش ساده است.
batchRunReports این یک نسخه دسته ای از روش runReport است که به شما امکان می دهد چندین گزارش را با استفاده از یک فراخوانی API ایجاد کنید.
runPivotReport این روش یک گزارش محوری سفارشی از دادههای رویداد Google Analytics شما را برمیگرداند. گزارشهای محوری، فرمتهای پیشرفتهتر و گویاتر از گزارشهای معمولی هستند. هر محور، ستونها و ردیفهای بعد قابل مشاهده را در پاسخ گزارش توصیف میکند.
batchRunPivotReports این نسخه دسته ای از روش runPivotReport است که به شما امکان می دهد چندین گزارش را با استفاده از یک فراخوانی API ایجاد کنید.
getMetadata این روش متادیتا را برای ابعاد و معیارهای موجود در روش های گزارش برمی گرداند. برای بررسی ابعاد و معیارها استفاده می شود. پاسخ این روش همچنین شامل ابعاد و معیارهای سفارشی موجود برای ویژگی Google Analytics مشخص شده است.
checkCompatibility این روش ابعاد و معیارهایی را فهرست می کند که می توانند به درخواست گزارش اضافه شوند و سازگاری را حفظ کنند.
runRealtimeReport این روش یک گزارش سفارشی از داده های رویداد بیدرنگ را برای دارایی شما برمی گرداند. رویدادها چند ثانیه پس از ارسال به Google Analytics در گزارشهای بلادرنگ ظاهر میشوند. گزارشهای بلادرنگ رویدادها و دادههای استفاده را برای دورههای زمانی از لحظه حال تا 30 دقیقه قبل نشان میدهند (تا 60 دقیقه برای خواص Google Analytics 360).
properties.recurringAudienceLists(پیش نمایش اولیه) گروهی از روش ها که به شما امکان می دهد صادرات تکراری مخاطب را مدیریت کنید. صادرات مکرر مخاطب، هر روز فهرست مخاطبان جدیدی تولید می کند.
runFunnelReport(پیشنمایش اولیه) این روش یک گزارش قیف سفارشی از دادههای رویداد Google Analytics شما را برمیگرداند. کاوش قیف به شما این امکان را میدهد تا مراحلی را که کاربران برای تکمیل یک کار برمیدارند تجسم کنید و به سرعت ببینید که در هر مرحله چقدر موفق یا شکست میخورند.
ابعاد و معیارهای پشتیبانی شده
برای فهرستی از تمام ابعاد و معیارهای پشتیبانی شده توسط Data API، به مستندات طرحواره API مراجعه کنید.
تاریخ آخرین بهروزرسانی 2025-03-10 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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"]],["تاریخ آخرین بهروزرسانی 2025-03-10 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe Google Analytics Data API (v1) allows programmatic access to Google Analytics report data, excluding Universal Analytics properties.\u003c/p\u003e\n"],["\u003cp\u003eThis API offers methods for retrieving various report types, including standard, pivot, realtime, and funnel reports, and enables tasks like building custom dashboards and automating reporting.\u003c/p\u003e\n"],["\u003cp\u003eUsers can leverage client libraries in Java, Python, Node.js, and other languages for streamlined implementation.\u003c/p\u003e\n"],["\u003cp\u003eThe API is currently in Alpha and Beta stages with potential for breaking changes, particularly in Alpha features.\u003c/p\u003e\n"],["\u003cp\u003eComprehensive documentation, including API schema, quickstart guides, and reference materials, are available to aid developers in utilizing the API effectively.\u003c/p\u003e\n"]]],["The Google Analytics Data API allows programmatic access to report data, excluding legacy Universal Analytics properties. It offers Alpha and Beta channels with varying stability. Key actions include generating reports (simple, pivot, funnel, real-time), batching reports, retrieving metadata, and checking compatibility. The API can build dashboards, automate reporting, and integrate data with other apps. Client libraries simplify implementation. Methods include `runReport`, `runPivotReport`, `runFunnelReport`, and managing audience exports, among others.\n"],null,["You can use the [Data API](/analytics/devguides/reporting/data/v1/rest) to\nprogrammatically access Google Analytics (Google Analytics) report data. This\nAPI isn't compatible with legacy Universal Analytics properties.\n\n[Learn more about Google Analytics\nproperties](//support.google.com/analytics/answer/9325020).\n| This API provides features in Alpha and Beta channels. Alpha and Beta products may have limited support, and changes to these products may not be compatible with other Alpha and Beta versions.\n|\n| **Alpha**:\n| Features are in an early preview stage. While we try to notify you of\n| upcoming changes, expect to encounter breaking changes before the API is publicly released.\n|\n| **Beta**:\n| No breaking changes are expected in this channel.\n|\n| For official Google Analytics API announcements, subscribe to the\n| [Google Analytics API Notify Group](https://groups.google.com/forum/#!forum/google-analytics-api-notify).\n\nHere are some examples you might report on using the Google Analytics Data API v1:\n\n- How many daily active users has your Android app had in the last week.\n- How many page views the top 10 pages on your site had in the last 28 days.\n- How many active users per country your iOS app had in the last 30 minutes.\n\nYou can also use the Google Analytics Data API v1 to do the following:\n\n- Build custom dashboards to display Google Analytics data.\n- Automate complex reporting tasks to save time.\n- Integrate your Google Analytics data with other business applications.\n\nGet started\n\nTo get started, see the [client library\nquickstart](/analytics/devguides/reporting/data/v1/quickstart-client-libraries). There are client libraries in Java,\nPython, Node.js, and other languages to simplify your implementation.\n\nAvailable methods\n\nHere's a list of the Data API methods. For more details, see the [reference\ndocumentation](/analytics/devguides/reporting/data/v1/rest).\n\n- [`runReport`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport) This method returns a customized report of your Google Analytics event data and is the preferred method for [simple report queries](/analytics/devguides/reporting/data/v1/basics).\n- [`batchRunReports`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/batchRunReports) This is a batch version of the runReport method which lets you generate multiple reports using a single API call.\n- [`runPivotReport`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runPivotReport) This method returns a customized [pivot report](/analytics/devguides/reporting/data/v1/pivots) of you Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. Each pivot describes the visible dimension columns and rows in the report response.\n- [`batchRunPivotReports`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/batchRunPivotReports) This is a batch version of the runPivotReport method which lets you generate multiple reports using a single API call.\n- [`getMetadata`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata) This method returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. The response of this method also includes the Custom dimensions and metrics available for the specified Google Analytics property.\n- [`checkCompatibility`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/checkCompatibility) This method lists dimensions and metrics that can be added to a report request and maintain compatibility.\n- [`runRealtimeReport`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runRealtimeReport) This method returns a customized [report of realtime event data](/analytics/devguides/reporting/data/v1/realtime-basics) for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes for Google Analytics 360 properties).\n- [`properties.audienceExports`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports) A group of methods that let you [generate Audience\n Exports](/analytics/devguides/reporting/data/v1/audience-export-basics), which include a snapshot of the users in an audience.\n- [`properties.recurringAudienceLists`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties.recurringAudienceLists) **(Early preview)** A group of methods that let you manage recurring Audience Exports. A recurring audience export produces new audience lists each day.\n- [`runFunnelReport`](/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/runFunnelReport) **(Early preview)** This method returns a customized [funnel\n report](/analytics/devguides/reporting/data/v1/funnels) of your Google Analytics event data. Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step.\n\nSupported dimensions and metrics\n\nFor a list of all the dimensions and metrics supported by the Data API, see the\n[API schema documentation](/analytics/devguides/reporting/data/v1/api-schema)."]]