Learn R Programming

googleAnalyticsR (version 0.1.0)

segment_ga4: Make a segment object for use

Description

A Segment is a subset of the Analytics data. For example, of the entire set of users, one Segment might be users from a particular country or city.

Usage

segment_ga4(name, segment_id = NULL, user_segment = NULL,
  session_segment = NULL)

Arguments

name
The name of the segment for the reports.
segment_id
The segment ID of a built in or custom segment e.g. gaid::-3
user_segment
A list of segment_define's that apply to users
session_segment
A list of segment_define's that apply to sessions

Value

  • a segmentFilter object. You can pass a list of these to the request.

Details

segment_ga4 is the top heirarchy of segment creation, for which you will also need: