GoogleAnalytics: Request data from Google Analytics

View source: R/GoogleAnalytics.R

GoogleAnalyticsR Documentation

Request data from Google Analytics

Description

Request data from Google Analytics

Usage

GoogleAnalytics(
  dimensions,
  metrics,
  start.date,
  end.date,
  secret.text,
  table.num = 1
)

Arguments

dimensions

A string (comma separated) or list of strings containing the dimensions to request.

metrics

Similar to dimensions but for metrics.

start.date, end.date

The start and end dates for the query. If it is a string it will be coerced to a date using YMD format.

secret.text

The JSON formatted string containing the secret text that identifies your account.

table.num

If your account contains multiple tables, use this to select the table to query. Defaults to the first table.

Details

See https://developers.google.com/analytics/devguides/reporting/core/dimsmets for details of the available dimensions and metrics.

See http://wiki.q-researchsoftware.com/wiki/How_to_Import_Data_from_Google_Analytics for more information about setting up your Google Analytics account for use with this function. The parameter secret.text is the text contained in the JSON file you get when adding a Service Account.


NumbersInternational/flipAPI documentation built on April 17, 2024, 2:46 p.m.