View source: R/GoogleAnalytics.R
GoogleAnalytics | R Documentation |
Request data from Google Analytics
GoogleAnalytics(
dimensions,
metrics,
start.date,
end.date,
secret.text,
table.num = 1
)
dimensions |
A string (comma separated) or list of strings containing the dimensions to request. |
metrics |
Similar to |
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. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.