با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Google Analytics Data API v1 گزارش هایی را برای ویژگی های Google Analytics تولید می کند. درخواست های API برای تعیین شناسه عددی ویژگی Google Analytics مورد نیاز است. اسناد و کد نمونه Data API به این شناسه به عنوان GA_PROPERTY_ID اشاره دارد.
استفاده
همه روشهای Data API نیاز دارند که شناسه ویژگی Google Analytics در یک مسیر درخواست URL به شکل properties/GA_PROPERTY_ID مشخص شود، مانند:
POST https://analyticsdata.googleapis.com/v1beta/properties/GA_PROPERTY_ID:runReport
اگر از یکی از کتابخانه های سرویس گیرنده Data API استفاده می کنید، نیازی به دستکاری مسیر URL درخواست به صورت دستی نیست. اکثر کلاینتهای API یک پارامتر property را ارائه میکنند که انتظار رشتهای به شکل properties/GA_PROPERTY_ID دارد. برای مثال هایی از استفاده از کتابخانه های سرویس گیرنده، راهنمای شروع سریع را ببینید.
شناسه ملک من چیست؟
اگر گزارشهای تحلیلی را در یکی از محصولات زیر پیکربندی کردهاید، میتوانید از Data API استفاده کنید:
گوگل آنالیتیکس
گوگل آنالیتیکس انواع مختلفی از Properties دارد. برای استفاده از Data API، یک ویژگی باید یک ویژگی Google Analytics باشد، برخلاف Universal Analytics. Universal Analytics نسخه قدیمی Google Analytics است و توسط Data API پشتیبانی نمیشود.
اگر تنظیمات Property عددی "ProPERTY ID" مانند "123..." را نشان می دهد، این شناسه عددی دارایی Google Analytics شما است.
Firebase
اگر Google Analytics را به Firebase مرتبط کرده باشید، داده های تجزیه و تحلیل پروژه خود را در Firebase خواهید دید. برای کسب اطلاعات بیشتر درباره پیوند دادن، به پیوند Google Analytics به Firebase مراجعه کنید.
برای تعیین ویژگی Google Analytics برای پروژه Firebase:
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe Google Analytics Data API v1 allows you to access Google Analytics property data using a numeric property identifier (\u003ccode\u003eGA_PROPERTY_ID\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eYou can find your \u003ccode\u003eGA_PROPERTY_ID\u003c/code\u003e in the Property Settings of your Google Analytics, Firebase, or AdMob account.\u003c/p\u003e\n"],["\u003cp\u003eUniversal Analytics properties are not supported by the Data API; use the Google Analytics Reporting API v4 instead.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries simplify API usage by providing a \u003ccode\u003eproperty\u003c/code\u003e parameter, eliminating the need to manually manipulate request URLs.\u003c/p\u003e\n"]]],["The Google Analytics Data API v1 requires a numeric property identifier (`GA_PROPERTY_ID`) to generate reports. This ID is specified in the API request URL as `properties/GA_PROPERTY_ID`. You can find your property ID in Google Analytics' Property Settings, Firebase's Google Analytics Integration page, or by navigating from AdMob to Firebase. The Data API only supports Google Analytics properties, not Universal Analytics properties which uses the Google Analytics Reporting API v4.\n"],null,["# Property ID\n\nThe Google Analytics Data API v1 produces reports for [Google Analytics\nproperties](//support.google.com/analytics/answer/9304153#property).\nAPI requests are required to specify a numeric Google Analytics\nproperty identifier. The documentation and sample code of the Data API refer to\nthis ID as `GA_PROPERTY_ID`.\n\nUsage\n-----\n\nAll Data API methods require the Google Analytics property identifier to be\nspecified inside a URL request path in the form of `properties/GA_PROPERTY_ID`,\nsuch as: \n\n POST https://analyticsdata.googleapis.com/v1beta/properties/GA_PROPERTY_ID:runReport\n\nIf you are using one of the [Data API client libraries](/analytics/devguides/reporting/data/v1/client-libraries), there\nis no need to manipulate the request URL path manually. Most API clients\nprovide a `property` parameter that expects a string in the form of\n`properties/GA_PROPERTY_ID`. See [Quick start guide](/analytics/devguides/reporting/data/v1/quickstart-client-libraries)\nfor examples of using the client libraries.\n\nWhat is my property ID?\n-----------------------\n\nYou can use the Data API if you have configured analytics reports in either of\nthe following products:\n\n### Google Analytics\n\nGoogle Analytics has multiple types of Properties. To use the Data API, a\nproperty must be a Google Analytics property, as opposed to Universal\nAnalytics. Universal Analytics is an older version of Google Analytics and is\nnot supported by the Data API.\n\nTo determine a Google Analytics property ID:\n\n1. Visit Google Analytics at \u003chttps://analytics.google.com/\u003e.\n2. Select Admin.\n3. Select the Property.\n4. Select Property Settings.\n\nIf the Property Settings shows a numeric \"PROPERTY ID\" such as \"123...\", this\nis the numeric ID of your Google Analytics property.\n| **Note:** If the Property Settings shows a \"Tracking ID\" such as \"UA-123...-1\", this Property is a Universal Analytics property, and the Analytics data for that property cannot be reported on in the Data API. For that property, you can use the [Google Analytics Reporting API v4](/analytics/devguides/reporting/core/v4) to produce analytics data reports.\n\n### Firebase\n\nIf you have linked Google Analytics to Firebase, you will see analytics data for\nyour project in Firebase. To learn more about linking, see [Link Google\nAnalytics to Firebase](//support.google.com/analytics/answer/9289234).\n\nTo determine the Google Analytics property for a Firebase project:\n\n1. Visit the Firebase console at \u003chttps://console.firebase.google.com/\u003e.\n2. Select your project.\n3. Select Project settings.\n4. Select Integrations.\n5. Select your Google Analytics Integration.\n\nThe Google Analytics Integration page will show a numeric \"Property ID\" such as\n\"123...\". This is the numeric ID of your Google Analytics property.\n\n### AdMob\n\nIf you have [enabled user metrics](//support.google.com/admob/answer/9263723)\nand\n[linked your apps to Firebase](//support.google.com/admob/answer/6383165)\nin AdMob, you will see user metrics in AdMob for your app.\n| **Note:** Currently, linking your AdMob app to Firebase and adding the Google Analytics for Firebase SDK to your app are optional. However, with the [upcoming changes to the collection of user metrics](//support.google.com/admob/answer/13973847) in late 2023, linking to Firebase and adding the Analytics SDK will be required to collect [user metrics for AdMob](//support.google.com/admob/answer/9281746) as well as to [explore and work with this data](//firebase.google.com/docs/admob/analytics-and-firebase).\n\nTo determine the Google Analytics property for an AdMob app:\n\n1. Visit AdMob at \u003chttps://apps.admob.com/\u003e.\n2. Select your app.\n3. Select App Overview.\n4. Select \"FIREBASE DASHBOARD\".\n5. Follow the above Firebase instructions starting with \"Select Project settings.\""]]