Google Analytics Admin V1alpha Client - Class Audience (0.8.2)

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

A resource message representing a GA4 Audience.

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

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ namestring

Output only. The resource name for this Audience resource. Format: properties/{propertyId}/audiences/{audienceId}

↳ display_namestring

Required. The display name of the Audience.

↳ descriptionstring

Required. The description of the Audience.

↳ membership_duration_daysint

Required. Immutable. The duration a user should stay in an Audience. It cannot be set to more than 540 days.

↳ ads_personalization_enabledbool

Output only. It is automatically set by GA to false if this is an NPA Audience and is excluded from ads personalization.

↳ event_triggerGoogle\Analytics\Admin\V1alpha\AudienceEventTrigger

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

↳ exclusion_duration_modeint

Immutable. Specifies how long an exclusion lasts for users that meet the exclusion filter. It is applied to all EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter clause in the Audience.

↳ filter_clausesarray<Google\Analytics\Admin\V1alpha\AudienceFilterClause>

Required. Immutable. null Filter clauses that define the Audience. All clauses will be AND’ed together.

getName

Output only. The resource name for this Audience resource.

Format: properties/{propertyId}/audiences/{audienceId}

Returns
TypeDescription
string

setName

Output only. The resource name for this Audience resource.

Format: properties/{propertyId}/audiences/{audienceId}

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDisplayName

Required. The display name of the Audience.

Returns
TypeDescription
string

setDisplayName

Required. The display name of the Audience.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDescription

Required. The description of the Audience.

Returns
TypeDescription
string

setDescription

Required. The description of the Audience.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getMembershipDurationDays

Required. Immutable. The duration a user should stay in an Audience. It cannot be set to more than 540 days.

Returns
TypeDescription
int

setMembershipDurationDays

Required. Immutable. The duration a user should stay in an Audience. It cannot be set to more than 540 days.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getAdsPersonalizationEnabled

Output only. It is automatically set by GA to false if this is an NPA Audience and is excluded from ads personalization.

Returns
TypeDescription
bool

setAdsPersonalizationEnabled

Output only. It is automatically set by GA to false if this is an NPA Audience and is excluded from ads personalization.

Parameter
NameDescription
varbool
Returns
TypeDescription
$this

getEventTrigger

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

Returns
TypeDescription
Google\Analytics\Admin\V1alpha\AudienceEventTrigger|null

hasEventTrigger

clearEventTrigger

setEventTrigger

Optional. Specifies an event to log when a user joins the Audience. If not set, no event is logged when a user joins the Audience.

Parameter
NameDescription
varGoogle\Analytics\Admin\V1alpha\AudienceEventTrigger
Returns
TypeDescription
$this

getExclusionDurationMode

Immutable. Specifies how long an exclusion lasts for users that meet the exclusion filter. It is applied to all EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter clause in the Audience.

Returns
TypeDescription
int

setExclusionDurationMode

Immutable. Specifies how long an exclusion lasts for users that meet the exclusion filter. It is applied to all EXCLUDE filter clauses and is ignored when there is no EXCLUDE filter clause in the Audience.

Parameter
NameDescription
varint
Returns
TypeDescription
$this

getFilterClauses

Required. Immutable. null Filter clauses that define the Audience. All clauses will be AND’ed together.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setFilterClauses

Required. Immutable. null Filter clauses that define the Audience. All clauses will be AND’ed together.

Parameter
NameDescription
vararray<Google\Analytics\Admin\V1alpha\AudienceFilterClause>
Returns
TypeDescription
$this