Description Usage Arguments Details See Also Examples
Suitable for tracking pages
1 2 |
url_path |
The path portion of the page URL, should start with |
url_host |
Specifies the hostname from which content was hosted |
url_title |
The title of the page or document. |
enhanced_ecom |
A |
... |
Other named arguments to pass in as payload data |
Helper wrapper to send page type hits. Specify named arguments to also send those, including overriding the helper arguments. E.g. set your own cid = "fixed-value" if you want to have hits to be recorded as coming from the same user.
https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
1 2 3 4 5 6 7 8 9 | # send hit as a page
gmr_hit_page("/hi-from-r-example")
# override the dp argument (page path)
gmr_hit_page("/hi-from-r-test", dp = "/bye-from-r-test")
# set other arguments
my_cid <- gmr_uuid()
gmr_hit_page("/hi-from-r-test", cid = my_cid)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.