Skip to content

Instantly share code, notes, and snippets.

@MarkEdmondson1234
Created September 22, 2015 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkEdmondson1234/ce5aea57e8a954082b7d to your computer and use it in GitHub Desktop.
Save MarkEdmondson1234/ce5aea57e8a954082b7d to your computer and use it in GitHub Desktop.
library(googleAnalyticsR_public)
gar_auth(new_user=T)
## your profile view Id
id <- "XXXXXX"
## 61607 results
## 30049 unique Ids
## 185 Sku's
product_views <- google_analytics(id, "2015-08-07", "2015-09-01",
metrics = 'productDetailViews',
dimensions = c('productSku','dimension1'),
samplingLevel = "WALK")
## 8855 results
## 6336 unique Ids
## 169 Sku's
product_trans <- google_analytics(id, "2015-08-07", "2015-09-01",
metrics = c('itemRevenue','uniquePurchases'),
dimensions = c('transactionId','productSku','dimension1'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment