get_mcf: Get the Anaytics data from Multi-Channel Funnels Reporting...

Description Usage Arguments Value References See Also Examples

Description

Get the Anaytics data from Multi-Channel Funnels Reporting API for a view (profile)

Usage

1
2
3
4
get_mcf(profile.id, start.date = "7daysAgo", end.date = "yesterday",
  metrics = "mcf:totalConversions", dimensions = NULL, sort = NULL,
  filters = NULL, sampling.level = NULL, start.index = NULL,
  max.results = NULL, token)

Arguments

profile.id

integer or character. Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID. Can be obtained using the list_profiles or via the web interface Google Analytics.

start.date

character. Start date for fetching Analytics data. Request can specify a start date formatted as YYYY-MM-DD or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo.

end.date

character. End date for fetching Analytics data. Request can specify an end date formatted as YYYY-MM-DD or as a relative date (e.g., today, yester-day, or 7daysAgo). The default value is yesterday.

metrics

character. A comma-separated list of Multi-Channel Funnels metrics. E.g., "mcf:totalConversions,mcf:totalConversionValue". At least one metric must be specified.

dimensions

character. A comma-separated list of Multi-Channel Funnels dimensions. E.g., code"mcf:source,mcf:medium".

sort

character. character. A comma-separated list of dimensions or metrics that determine the sort order for Analytics data.

filters

character. A comma-separated list of dimension or metric filters to be applied to Analytics data.

sampling.level

character. The desired sampling level. Allowed values: "default", "faster", "higher_precision".

start.index

integer. An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.

max.results

integer. The maximum number of entries to include in this feed.

token

Token2.0 class object with a valid authorization data.

Value

A data frame including the Analytics Multi-Channel Funnels data for a view (profile). Addition information about profile and request query stored in the attributes.

References

MCF Reporting API - Dimensions & Metrics Reference

MCF Reporting API - Query Parameter Details

See Also

authorize

Other Reporting API: firstdate; get_ga; get_realtime, get_rt

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# get token data
authorize()
# get report data
ga_data <- get_mcf("profile_id", start.date = "30daysAgo", end.date = "today",
                   metrics = "mcf:totalConversions",
                   dimensions = "mcf:source,mcf:medium")

## End(Not run)

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