gmr_hit_page: Send a page type hit

Description Usage Arguments Details See Also Examples

View source: R/hit_types.R

Description

Suitable for tracking pages

Usage

1
2
gmr_hit_page(url_path = NULL, url_host = NULL, url_title = NULL,
  enhanced_ecom = NULL, ...)

Arguments

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 gmr_ee generated via gmr_enhanced_ecom

...

Other named arguments to pass in as payload data

Details

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.

See Also

https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters

Examples

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)

MarkEdmondson1234/googleMeasureR documentation built on Oct. 27, 2019, 9:02 p.m.