The R way to interact with Google's Tag Manager API.
At the moment listing of elements is available, but in the future both updates and delete will be supported. This is not a professional package and serves mostly as a way of organising code snippets for my work.
Most of this is adopted from the excellent autoGoogleAPI package from Mark Edmondson and his most awesome googleAnalyticsR that I use daily.
To install the package in your R setup just use devtools and the install_github() function like below
install.packages('devtools')
devtools::install_github('IronistM/googleTagManageR')gtm_auth()
gtm_accounts_list()Let's say you want to get the details from YOUR_ACCOUNT_ID, then you use the following
gtm_account(accountId = YOUR_ACCOUNT_ID)Similarly, to get the containers of YOUR_ACCOUNT_ID, use the following
gtm_containers_list(accountId = YOUR_ACCOUNT_ID)