AI-generated Key Takeaways
-
Key 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.
-
You 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.
-
There are methods available to create, retrieve, update, and delete Key Events within a property via the API.
-
Key Events can be either custom, defined by property admins, or default, with pre-defined meanings within Google Analytics.
Resource: KeyEvent
A key event in a Google Analytics property.
JSON representation |
---|
{ "name": string, "eventName": string, "createTime": string, "deletable": boolean, "custom": boolean, "countingMethod": enum ( |
Fields | |
---|---|
name |
Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{keyEvent} |
eventName |
Immutable. The event name for this key event. Examples: 'click', 'purchase' |
createTime |
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: |
deletable |
Output only. If set to true, this event can be deleted. |
custom |
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. |
countingMethod |
Required. The method by which Key Events will be counted across multiple events within a session. |
defaultValue |
Optional. Defines a default value/currency for a key event. |
CountingMethod
The method by which Key Events will be counted across multiple events within a session.
Enums | |
---|---|
COUNTING_METHOD_UNSPECIFIED |
Counting method not specified. |
ONCE_PER_EVENT |
Each Event instance is considered a Key Event. |
ONCE_PER_SESSION |
An Event instance is considered a Key Event at most once per session per user. |
DefaultValue
Defines a default value/currency for a key event.
JSON representation |
---|
{ "numericValue": number, "currencyCode": string } |
Fields | |
---|---|
numericValue |
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. |
currencyCode |
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 https://en.wikipedia.org/wiki/ISO_4217 for more information. |
Methods |
|
---|---|
|
Creates a Key Event. |
|
Deletes a Key Event. |
|
Retrieve a single Key Event. |
|
Returns a list of Key Events in the specified parent property. |
|
Updates a Key Event. |