Description Usage Arguments Value Examples
Request for approval of the user to send information to Google Analytics.
The approval is requested by setting yes/no in the prompt if consent is set to FALSE and the user is working in interactive mode.
If consent is set to TRUE, the developer is responsible for complying to legislation in your area like the
General Data Protection Regulation (GDPR) in Europa.
1 | ga_set_approval(message, consent = FALSE)
|
message |
a character string with a message to show to the user before approval is requested. If not given will show a default message. |
consent |
logical indicating to give approval. Defaults to FALSE indicating that no approval is given. |
invisibly a list all general settings used to send data to Google Analytics
1 2 3 4 5 6 7 | ## Request user input
ga_set_approval(consent = FALSE)
ga_set_approval(consent = FALSE,
message = "Please approve that we send usage information to Google Analytics")
## Developer sets consent directly assuming that he received approval in another way
ga_set_approval(consent = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.