Output only. Time when this key event was created in the property.
↳ deletable
bool
Output only. If set to true, this event can be deleted.
↳ custom
bool
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.
↳ counting_method
int
Required. The method by which Key Events will be counted across multiple events within a session.
Output only. If set to true, this event can be deleted.
Returns
Type
Description
bool
setDeletable
Output only. If set to true, this event can be deleted.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getCustom
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.
Returns
Type
Description
bool
setCustom
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.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getCountingMethod
Required. The method by which Key Events will be counted across multiple
events within a session.
Returns
Type
Description
int
setCountingMethod
Required. The method by which Key Events will be counted across multiple
events within a session.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getDefaultValue
Optional. Defines a default value/currency for a key event.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Analytics Admin V1beta Client - Class KeyEvent (0.29.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.29.1 (latest)](/php/docs/reference/analytics-admin/latest/V1beta.KeyEvent)\n- [0.29.0](/php/docs/reference/analytics-admin/0.29.0/V1beta.KeyEvent)\n- [0.28.1](/php/docs/reference/analytics-admin/0.28.1/V1beta.KeyEvent)\n- [0.27.0](/php/docs/reference/analytics-admin/0.27.0/V1beta.KeyEvent)\n- [0.26.0](/php/docs/reference/analytics-admin/0.26.0/V1beta.KeyEvent)\n- [0.25.2](/php/docs/reference/analytics-admin/0.25.2/V1beta.KeyEvent)\n- [0.24.2](/php/docs/reference/analytics-admin/0.24.2/V1beta.KeyEvent)\n- [0.23.0](/php/docs/reference/analytics-admin/0.23.0/V1beta.KeyEvent)\n- [0.22.5](/php/docs/reference/analytics-admin/0.22.5/V1beta.KeyEvent)\n- [0.20.0](/php/docs/reference/analytics-admin/0.20.0/V1beta.KeyEvent)\n- [0.19.0](/php/docs/reference/analytics-admin/0.19.0/V1beta.KeyEvent)\n- [0.18.1](/php/docs/reference/analytics-admin/0.18.1/V1beta.KeyEvent)\n- [0.17.0](/php/docs/reference/analytics-admin/0.17.0/V1beta.KeyEvent)\n- [0.16.0](/php/docs/reference/analytics-admin/0.16.0/V1beta.KeyEvent)\n- [0.15.1](/php/docs/reference/analytics-admin/0.15.1/V1beta.KeyEvent)\n- [0.14.0](/php/docs/reference/analytics-admin/0.14.0/V1beta.KeyEvent)\n- [0.13.0](/php/docs/reference/analytics-admin/0.13.0/V1beta.KeyEvent)\n- [0.12.0](/php/docs/reference/analytics-admin/0.12.0/V1beta.KeyEvent)\n- [0.11.1](/php/docs/reference/analytics-admin/0.11.1/V1beta.KeyEvent)\n- [0.10.0](/php/docs/reference/analytics-admin/0.10.0/V1beta.KeyEvent)\n- [0.9.0](/php/docs/reference/analytics-admin/0.9.0/V1beta.KeyEvent)\n- [0.8.2](/php/docs/reference/analytics-admin/0.8.2/V1beta.KeyEvent) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Analytics Admin V1beta Client class KeyEvent.\n\nA key event in a Google Analytics property.\n\nGenerated from protobuf message `google.analytics.admin.v1beta.KeyEvent`\n\nNamespace\n---------\n\nGoogle \\\\ Analytics \\\\ Admin \\\\ V1beta\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. Resource name of this key event.\n\nFormat: properties/{property}/keyEvents/{key_event}\n\n### setName\n\nOutput only. Resource name of this key event.\n\nFormat: properties/{property}/keyEvents/{key_event}\n\n### getEventName\n\nImmutable. The event name for this key event.\n\nExamples: 'click', 'purchase'\n\n### setEventName\n\nImmutable. The event name for this key event.\n\nExamples: 'click', 'purchase'\n\n### getCreateTime\n\nOutput only. Time when this key event was created in the property.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. Time when this key event was created in the property.\n\n### getDeletable\n\nOutput only. If set to true, this event can be deleted.\n\n### setDeletable\n\nOutput only. If set to true, this event can be deleted.\n\n### getCustom\n\nOutput only. If set to true, this key event refers to a custom event. If\nset to false, this key event refers to a default event in GA. Default\nevents typically have special meaning in GA. Default events are usually\ncreated for you by the GA system, but in some cases can be created by\nproperty admins. Custom events count towards the maximum number of\ncustom key events that may be created per property.\n\n### setCustom\n\nOutput only. If set to true, this key event refers to a custom event. If\nset to false, this key event refers to a default event in GA. Default\nevents typically have special meaning in GA. Default events are usually\ncreated for you by the GA system, but in some cases can be created by\nproperty admins. Custom events count towards the maximum number of\ncustom key events that may be created per property.\n\n### getCountingMethod\n\nRequired. The method by which Key Events will be counted across multiple\nevents within a session.\n\n### setCountingMethod\n\nRequired. The method by which Key Events will be counted across multiple\nevents within a session.\n\n### getDefaultValue\n\nOptional. Defines a default value/currency for a key event.\n\n### hasDefaultValue\n\n### clearDefaultValue\n\n### setDefaultValue\n\nOptional. Defines a default value/currency for a key event."]]