Learn R Programming

RGA (version 0.4.2)

firstdate: First Date

Description

Get the first date with available data.

Usage

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

Run this code
## 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)

Run the code above in your browser using DataLab