firstdate: First Date

Description Usage Arguments Value See Also Examples

View source: R/firstdate.R

Description

Get the first date with available data.

Usage

1
firstdate(profileId, token)

Arguments

profileId

character. Google Analytics profile ID. Can be obtained using the list_profiles or via the web interface Google Analytics.

token

Token2.0 class object with a valid authorization data.

Value

Start date of collecting the Google Analytics statistics.

See Also

Other Reporting API: get_ga, get_mcf, get_realtime

Examples

1
2
3
4
5
6
7
8
## Not run: 
authorize()
first_date <- firstdate(profileId = "profile_id")
ga_data <- get_ga("profile_id", start.date = first_date, end.date = "today",
                  metrics = "ga:sessions", dimensions = "ga:source,ga:medium",
                  sort = "-ga:sessions")

## End(Not run)

RGA documentation built on May 2, 2019, 6:47 a.m.