Google Analytics Admin V1alpha Client - Class KeyEvent (0.24.2)

Reference documentation and code samples for the Google Analytics Admin V1alpha Client class KeyEvent.

A key event in a Google Analytics property.

Generated from protobuf message google.analytics.admin.v1alpha.KeyEvent

Namespace

Google \ Analytics \ Admin \ V1alpha

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}

↳ event_name string

Immutable. The event name for this key event. Examples: 'click', 'purchase'

↳ create_time Google\Protobuf\Timestamp

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.

↳ default_value KeyEvent\DefaultValue

Optional. Defines a default value/currency for a key event.

getName

Output only. Resource name of this key event.

Format: properties/{property}/keyEvents/{key_event}

Returns
Type Description
string

setName

Output only. Resource name of this key event.

Format: properties/{property}/keyEvents/{key_event}

Parameter
Name Description
var string
Returns
Type Description
$this

getEventName

Immutable. The event name for this key event.

Examples: 'click', 'purchase'

Returns
Type Description
string

setEventName

Immutable. The event name for this key event.

Examples: 'click', 'purchase'

Parameter
Name Description
var string
Returns
Type Description
$this

getCreateTime

Output only. Time when this key event was created in the property.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. Time when this key event was created in the property.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getDeletable

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.

Returns
Type Description
KeyEvent\DefaultValue|null

hasDefaultValue

clearDefaultValue

setDefaultValue

Optional. Defines a default value/currency for a key event.

Parameter
Name Description
var KeyEvent\DefaultValue
Returns
Type Description
$this