Learn R Programming

googleTagManageR (version 0.1.6)

gtm_auth: 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)

Arguments

email

The email address for the Google Account

token

An existing Google Auth Token

Value

Invisibly, the token that has been saved to the session

Examples

Run this code
# NOT RUN {
 
 
# }
# 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")
 
# }
# NOT RUN {
 
# }

Run the code above in your browser using DataLab