جرِّب خادم MCP لخدمة "إحصاءات Google". يمكنك تثبيت التطبيق من
GitHub والاطّلاع على
الإعلان لمعرفة المزيد من التفاصيل.
REST Resource: properties.keyEvents
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
المورد: KeyEvent
حدث رئيسي في موقع على "إحصاءات Google"
تمثيل JSON |
{
"name": string,
"eventName": string,
"createTime": string,
"deletable": boolean,
"custom": boolean,
"countingMethod": enum (CountingMethod ),
"defaultValue": {
object (DefaultValue )
}
} |
الحقول |
name |
string
النتائج فقط. اسم المورد لهذا الحدث الرئيسي التنسيق: properties/{property}/keyEvents/{keyEvent}
|
eventName |
string
غير قابل للتغيير اسم الحدث لهذا الحدث الرئيسي أمثلة: "click" و"purchase"
|
createTime |
string (Timestamp format)
النتائج فقط. الوقت الذي تم فيه إنشاء هذا الحدث الرئيسي في الموقع. يستخدم معيار RFC 3339، حيث يكون الناتج الذي يتم إنشاؤه دائمًا مُعدَّلاً وفقًا لقاعدة Z ويستخدم 0 أو 3 أو 6 أو 9 أرقام عشرية. يتم أيضًا قبول العناصر غير "Z". أمثلة: "2014-10-02T15:01:23Z" أو "2014-10-02T15:01:23.045123456Z" أو "2014-10-02T15:01:23+05:30"
|
deletable |
boolean
النتائج فقط. في حال ضبطها على "صحيح"، يمكن حذف هذا الحدث.
|
custom |
boolean
النتائج فقط. في حال ضبطها على "صحيح"، يشير هذا الحدث الرئيسي إلى حدث مخصّص. في حال ضبطه على false، يشير هذا الحدث الرئيسي إلى حدث تلقائي في "إحصاءات Google". عادةً ما يكون للأحداث التلقائية معنى خاصًا في "إحصاءات Google". وعادةً ما ينشئ نظام "إحصاءات Google" الأحداث التلقائية نيابةً عنك، ولكن في بعض الحالات يمكن أن ينشئها مشرفي الموقع. يتم احتساب الأحداث المخصّصة ضمن الحدّ الأقصى لعدد الأحداث الرئيسية المخصّصة التي يمكن إنشاؤها لكلّ موقع.
|
countingMethod |
enum (CountingMethod )
مطلوب. الطريقة التي سيتم من خلالها احتساب الأحداث الرئيسية على مستوى أحداث متعدّدة ضمن جلسة
|
defaultValue |
object (DefaultValue )
اختياريّ. يحدِّد قيمة/عملة تلقائية لحدث رئيسي.
|
CountingMethod
الطريقة التي سيتم من خلالها احتساب الأحداث الرئيسية على مستوى أحداث متعدّدة ضمن جلسة
عمليات التعداد |
COUNTING_METHOD_UNSPECIFIED |
لم يتم تحديد طريقة الاحتساب. |
ONCE_PER_EVENT |
يُعدّ كلّ مثيل حدث حدثًا رئيسيًا. |
ONCE_PER_SESSION |
يُعتبَر مثيل الحدث حدثًا رئيسيًا مرة واحدة بحد أقصى لكل جلسة لكل مستخدم. |
DefaultValue
يحدِّد قيمة/عملة تلقائية لحدث رئيسي.
تمثيل JSON |
{
"numericValue": number,
"currencyCode": string
} |
الحقول |
numericValue |
number
مطلوب. سيتم استخدام هذا الإجراء لتعبئة المَعلمة value لجميع مرّات ظهور هذا الحدث الرئيسي (الذي يحدّده eventName) حيث لم يتم ضبط هذه المَعلمة.
|
currencyCode |
string
مطلوب. عندما لا يكون هناك عملة محدّدة لحدث رئيسي معيّن (يتم تحديده من خلال eventName)، سيتم تطبيق هذه العملة كعملة تلقائية. يجب أن يكون بتنسيق رمز العملة ISO 4217. يُرجى الاطّلاع على https://en.wikipedia.org/wiki/ISO_4217 للحصول على مزيد من المعلومات.
|
الطُرق |
|
تُنشئ حدثًا رئيسيًا. |
|
لحذف حدث رئيسي |
|
استرداد حدث رئيسي واحد |
|
لعرض قائمة بالأحداث الرئيسية في الموقع الرئيسي المحدّد. |
|
تعديل حدث رئيسي |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eKey Events are actions or interactions within a Google Analytics property that can be tracked and analyzed, with options for how they are counted during a session.\u003c/p\u003e\n"],["\u003cp\u003eYou can define a default numeric value and currency for a Key Event to automatically populate these parameters for instances where they are not explicitly set.\u003c/p\u003e\n"],["\u003cp\u003eThere are methods available to create, retrieve, update, and delete Key Events within a property via the API.\u003c/p\u003e\n"],["\u003cp\u003eKey Events can be either custom, defined by property admins, or default, with pre-defined meanings within Google Analytics.\u003c/p\u003e\n"]]],["Key Events in Google Analytics are defined by an event name and can be associated with a counting method (once per event or session). Each Key Event includes attributes like its creation time, custom status, and deletable status. They have optional default values, consisting of a numeric value and currency code. Key Events can be created, deleted, retrieved, listed, and updated using provided methods. The resource includes JSON schema for the data structure.\n"],null,["# REST Resource: properties.keyEvents\n\n- [Resource: KeyEvent](#KeyEvent)\n - [JSON representation](#KeyEvent.SCHEMA_REPRESENTATION)\n- [CountingMethod](#CountingMethod)\n- [DefaultValue](#DefaultValue)\n - [JSON representation](#DefaultValue.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: KeyEvent\n------------------\n\nA key event in a Google Analytics property.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"eventName\": string, \"createTime\": string, \"deletable\": boolean, \"custom\": boolean, \"countingMethod\": enum (/analytics/devguides/config/admin/v1/rest/v1alpha/properties.keyEvents#CountingMethod), \"defaultValue\": { object (/analytics/devguides/config/admin/v1/rest/v1alpha/properties.keyEvents#DefaultValue) } } ``` |\n\n| Fields ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{keyEvent} |\n| `eventName` | `string` Immutable. The event name for this key event. Examples: 'click', 'purchase' |\n| `createTime` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)` format)` Output only. Time when this key event was created in the property. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n| `deletable` | `boolean` Output only. If set to true, this event can be deleted. |\n| `custom` | `boolean` Output only. If set to true, this key event refers to a custom event. If set to false, this key event refers to a default event in GA. Default events typically have special meaning in GA. Default events are usually created for you by the GA system, but in some cases can be created by property admins. Custom events count towards the maximum number of custom key events that may be created per property. |\n| `countingMethod` | `enum (`[CountingMethod](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.keyEvents#CountingMethod)`)` Required. The method by which Key Events will be counted across multiple events within a session. |\n| `defaultValue` | `object (`[DefaultValue](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.keyEvents#DefaultValue)`)` Optional. Defines a default value/currency for a key event. |\n\nCountingMethod\n--------------\n\nThe method by which Key Events will be counted across multiple events within a session.\n\n| Enums ||\n|-------------------------------|--------------------------------------------------------------------------------|\n| `COUNTING_METHOD_UNSPECIFIED` | Counting method not specified. |\n| `ONCE_PER_EVENT` | Each Event instance is considered a Key Event. |\n| `ONCE_PER_SESSION` | An Event instance is considered a Key Event at most once per session per user. |\n\nDefaultValue\n------------\n\nDefines a default value/currency for a key event.\n\n| JSON representation |\n|------------------------------------------------------------|\n| ``` { \"numericValue\": number, \"currencyCode\": string } ``` |\n\n| Fields ||\n|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `numericValue` | `number` Required. This will be used to populate the \"value\" parameter for all occurrences of this Key Event (specified by eventName) where that parameter is unset. |\n| `currencyCode` | `string` Required. When an occurrence of this Key Event (specified by eventName) has no set currency this currency will be applied as the default. Must be in ISO 4217 currency code format. See \u003chttps://en.wikipedia.org/wiki/ISO_4217\u003e for more information. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------------------------------|----------------------------------------------------------------|\n| ### [create](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.keyEvents/create) | Creates a Key Event. |\n| ### [delete](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.keyEvents/delete) | Deletes a Key Event. |\n| ### [get](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.keyEvents/get) | Retrieve a single Key Event. |\n| ### [list](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.keyEvents/list) | Returns a list of Key Events in the specified parent property. |\n| ### [patch](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.keyEvents/patch) | Updates a Key Event. |"]]