Analytics | R Documentation |
Analytics
Analytics
An object of class Analytics
.
firebase::Firebase
-> Analytics
new()
Analytics$new(enable = TRUE)
enable
Whether to internally enable analytics
see launch
method.
Initialise
Initialise an analytics object.
launch()
Analytics$launch()
Launch
Launch the analytics tracking.
Note that analytics is not launched by the
constructor in order to be able to enable
or disable the tracking prior to the launch.
This is because once Google Analytics is
launched it cannot be disabled. If needed
ask the user before running this method.
The enabling and disabling of tracking provided
by the package is only internal, e.g.: disabling
tracking during a session will stop the log_event
method from registering event but default Google
Analytics will still be running.
enable()
Analytics$enable()
Enable Tracking Internally enables tracking.
disable()
Analytics$disable()
Disable Tracking Internally disables tracking: running methods from this instance of the class will not actually register with Google Analytics.
log_event()
Analytics$log_event(event, params = NULL)
event
Event to log choose from this list of supported events.
params
Event parameters.
Log Event
Log an event.
set_user_properties()
Analytics$set_user_properties(...)
...
Named arguments defining the properties of the user.
Set user properties
clone()
The objects of this class are cloneable with this method.
Analytics$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.