firstdate: Get the first date with available data

Description Usage Arguments Value See Also Examples

Description

Get the first date with available data

Usage

1
firstdate(profile.id, token)

Arguments

profile.id

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

authorize

Other Reporting API: get_ga; get_mcf; get_realtime, get_rt

Examples

1
2
3
4
5
6
7
8
## Not run: 
authorize()
first_date <- firstdate(profile.id = "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)

jdeboer/RGA-1 documentation built on May 18, 2019, 11:29 p.m.