Description Usage Arguments Details Value See Also
Send data to the Google Analytics API endpoint.
1 2 3 | gmr_post(payload_data, tid = Sys.getenv("MP_TRACKING_ID"),
hittype = c("pageview", "screenview", "event", "transaction", "item",
"social", "exception", "timing"))
|
payload_data |
A named list of paramters to send. |
tid |
Tracking ID. By default from the Sys environment |
hittype |
Either specify in argument |
Hits are sent via httr::POST
and are URL encoded.
The version argument is set for you: v=1L
ip
is implicitly sent in the HTTP request and is used to compute all the geo / network dimensions in Google Analytics. Override with payload_data$uip = 1.2.3.4
Set options("googleMeasureR.debug" = TRUE) to activate debug mode.
TRUE if successful
https://developers.google.com/analytics/devguides/collection/protocol/v1/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.