Reference documentation and code samples for the Google Analytics Data V1alpha Client class Segment.
A segment is a subset of your Analytics data. For example, of your entire set of users, one segment might be users from a particular country or city.
Another segment might be users who purchase a particular line of products or who visit a specific part of your site or trigger certain events in your app. To learn more, see Segment Builder .
Generated from protobuf message google.analytics.data.v1alpha.Segment
Namespace
Google \ Analytics \ Data \ V1alphaMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
The name for this segment. If unspecified, segments are named "Segment". This name defines string value returned by the segment
dimension. The segment
dimension prefixes segment names by the 1-based index number of the segment in the request (for example "1. Segment", "2. Segment", etc.).
↳ user_segment
↳ session_segment
↳ event_segment
getName
The name for this segment. If unspecified, segments are named "Segment".
This name defines string value returned by the segment
dimension. The segment
dimension prefixes segment names by the 1-based index number of
the segment in the request (for example "1. Segment", "2. Segment", etc.).
string
setName
The name for this segment. If unspecified, segments are named "Segment".
This name defines string value returned by the segment
dimension. The segment
dimension prefixes segment names by the 1-based index number of
the segment in the request (for example "1. Segment", "2. Segment", etc.).
var
string
$this
getUserSegment
User segments are subsets of users who engaged with your site or app.
hasUserSegment
setUserSegment
User segments are subsets of users who engaged with your site or app.
$this
getSessionSegment
Session segments are subsets of the sessions that occurred on your site or app.
hasSessionSegment
setSessionSegment
Session segments are subsets of the sessions that occurred on your site or app.
$this
getEventSegment
Event segments are subsets of events that were triggered on your site or app.
hasEventSegment
setEventSegment
Event segments are subsets of events that were triggered on your site or app.
$this
getOneSegmentScope
string