gtm_auth {googleTagManageR} | R Documentation |
Auth for GTM Specific Properties
Description
This function authenticates the user with Google Tag Manager To use your own GTM API credentials, either ensure that you have set the path to your OAuth2 API Credentials file in your 'GAR_CLIENT_JSON' variable in your .Renviron file and then restart your R session or set
Usage
gtm_auth(email = NULL, token = NULL, sa_json = NULL)
Arguments
email |
The email address for the Google Account |
token |
An existing Google Auth Token |
sa_json |
A GCP Service Account Key in JSON format, either a string or file. |
Value
Invisibly, the token that has been saved to the session
Examples
## Not run:
# To use the included (shared) credentials
library(googleTagManageR)
gtm_auth()
# To useyour own GCP credentials
Sys.setenv("GAR_CLIENT_JSON" = "location/of/file.json")
library(googleTagManageR)
gtm_auth()
# Reauthentication - if you've already logged in
gtm_auth(email="me@mycompany.co.uk")
# Service Account Login
gtm_auth(sa_json="my-service-account.json")
## End(Not run)
[Package googleTagManageR version 0.2.0 Index]