From 228d3bba95ec2687a204b078bcec38b9cda56f03 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Wed, 16 Jul 2025 16:34:36 -0700 Subject: [PATCH] Added commands to display Google Tag Manager accounts --- wiki/Basic-Items.md | 8 ++ wiki/Collections-of-Items.md | 9 ++ wiki/GamUpdates.md | 6 + wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md | 4 +- wiki/List-Items.md | 3 + wiki/Users-Tag-Manager.md | 132 ++++++++++++++++++++++ wiki/Version-and-Help.md | 12 +- wiki/_Sidebar.md | 1 + 8 files changed, 167 insertions(+), 8 deletions(-) create mode 100644 wiki/Users-Tag-Manager.md diff --git a/wiki/Basic-Items.md b/wiki/Basic-Items.md index d338ad0b..4622b05e 100644 --- a/wiki/Basic-Items.md +++ b/wiki/Basic-Items.md @@ -519,6 +519,14 @@ gs:///| / ::= + ::= + ::= accounts/ + ::= + ::= accounts//containers/ + ::= + ::= accounts//containers//workspaces/ + ::= + ::= accounts//containers//workspaces//tags/ ::= takeout-export-[a-f,0-9,-]* ::= ::= diff --git a/wiki/Collections-of-Items.md b/wiki/Collections-of-Items.md index b30f2ab4..7d4185cf 100644 --- a/wiki/Collections-of-Items.md +++ b/wiki/Collections-of-Items.md @@ -351,6 +351,15 @@ Data fields identified in a `csvkmd` argument. | | | | ::= | | | | + ::= + | + (select |) | + ::= + | + (select |) | + ::= + | + (select |) | ::= | | | ::= diff --git a/wiki/GamUpdates.md b/wiki/GamUpdates.md index 414166b0..d815307a 100644 --- a/wiki/GamUpdates.md +++ b/wiki/GamUpdates.md @@ -10,6 +10,12 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation +### 7.14.00 + +Added commands to display Google Tag Manager accounts, containers, workspaces and tags. + +* See: https://github.com/GAM-team/GAM/wiki/Users-Tag-Manager + ### 7.13.03 Added option `csv [todrive *] [formatjson [quotechar ]]]` diff --git a/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md b/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md index b8cd665f..374fa161 100644 --- a/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md +++ b/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md @@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt. admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin$ gam version WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found -GAM 7.13.03 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.14.00 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.13.5 64-bit final MacOS Sequoia 15.5 x86_64 @@ -989,7 +989,7 @@ writes the credentials into the file oauth2.txt. C:\>del C:\GAMConfig\oauth2.txt C:\>gam version WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found -GAM 7.13.03 - https://github.com/GAM-team/GAM - pythonsource +GAM 7.14.00 - https://github.com/GAM-team/GAM - pythonsource GAM Team Python 3.13.5 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/wiki/List-Items.md b/wiki/List-Items.md index bd4135d7..fdb24dc0 100644 --- a/wiki/List-Items.md +++ b/wiki/List-Items.md @@ -98,6 +98,9 @@ ::= "(,)*" ::= "(,)*" ::= "(,)*" + ::= "(,)*" + ::= "(,)*" + ::= "(,)*" ::= "(,)*" ::= "''(,'')*" ::= "(,)*" diff --git a/wiki/Users-Tag-Manager.md b/wiki/Users-Tag-Manager.md new file mode 100644 index 00000000..cbd15176 --- /dev/null +++ b/wiki/Users-Tag-Manager.md @@ -0,0 +1,132 @@ +# Users - Tag Manager +- [API documentation](#api-documentation) +- [Notes](#notes) +- [Definitions](#definitions) +- [Display Tag Manager Accounts](#display-tag-manager-accounts) +- [Display Tag Manager Containers](#display-tag-manager-containers) +- [Display Tag Manager Workspaces](#display-tag-manager-workspaces) +- [Display Tag Manager Tags](#display-tag-manager-tags) + +## API documentation +* [Tag Manager API](https://developers.google.com/tag-manager/reference/rest) + +## Notes +To use these commands you must add the 'Tag Manager API' to your project and update your service account authorization. +``` +gam update project +gam user user@domain.com update serviceaccount +``` + +## Definitions +* [``](Collections-of-Users) +* [` | `](Collections-of-Items) +``` + ::= + ::= accounts/ + ::= "(,)*" + ::= + | + (select |) | + + ::= + ::= accounts//containers/ + ::= "(,)*" + ::= + | + (select |) | + + ::= + ::= accounts//containers//workspaces/ + ::= "(,)*" + ::= + | + (select |) | + + ::= + ::= accounts//containers//workspaces//tags/ +``` +## Display Tag Manager Accounts +``` +gam show tagmanageraccounts + [includegoogletags []] + [formatjson] +``` +By default, Gam displays the accounts as an indented list of keys and values. +* `formatjson` - Display the account in JSON format + +``` +gam print tagmanagerccounts [todrive *] + [includegoogletags []] + [formatjson [quotechar ]] +``` +By default, Gam displays the accounts as columns of fields; the following option causes the output to be in JSON format, +* `formatjson` - Display the fields in JSON format. + +By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain +the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. +When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. +The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. +`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. + +## Display Tag Manager Containers +``` +gam show tagmanagercontainers + [formatjson] +``` +By default, Gam displays the containers as an indented list of keys and values. +* `formatjson` - Display the container in JSON format + +``` +gam print tagmanagercontainers [todrive *] + [formatjson [quotechar ]] +``` +By default, Gam displays the containers as columns of fields; the following option causes the output to be in JSON format, +* `formatjson` - Display the fields in JSON format. + +By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain +the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. +When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. +The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. +`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. + +## Display Tag Manager Workspaces +``` +gam show tagmanagerworkspaces + [formatjson] +``` +By default, Gam displays the workspaces as an indented list of keys and values. +* `formatjson` - Display the workspace in JSON format + +``` +gam print tagmanagerworkspaces [todrive *] + [formatjson [quotechar ]] +``` +By default, Gam displays the workspaces as columns of fields; the following option causes the output to be in JSON format, +* `formatjson` - Display the fields in JSON format. + +By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain +the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. +When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. +The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. +`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. + +## Display Tag Manager Tags +``` +gam show tagmanagertags + [formatjson] +``` +By default, Gam displays the tags as an indented list of keys and values. +* `formatjson` - Display the tag in JSON format + +``` +gam print tagmanagertags [todrive *] + [formatjson [quotechar ]] +``` +By default, Gam displays the tags as columns of fields; the following option causes the output to be in JSON format, +* `formatjson` - Display the fields in JSON format. + +By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain +the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. +When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. +The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. +`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. diff --git a/wiki/Version-and-Help.md b/wiki/Version-and-Help.md index 3d1a7ffc..e6e03818 100644 --- a/wiki/Version-and-Help.md +++ b/wiki/Version-and-Help.md @@ -4,7 +4,7 @@ k Print the current version of Gam with details ``` gam version -GAM 7.13.03 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.14.00 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.13.5 64-bit final MacOS Sequoia 15.5 x86_64 @@ -16,7 +16,7 @@ Time: 2023-06-02T21:10:00-07:00 Print the current version of Gam with details and time offset information ``` gam version timeoffset -GAM 7.13.03 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.14.00 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.13.5 64-bit final MacOS Sequoia 15.5 x86_64 @@ -28,7 +28,7 @@ Your system time differs from www.googleapis.com by less than 1 second Print the current version of Gam with extended details and SSL information ``` gam version extended -GAM 7.13.03 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.14.00 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.13.5 64-bit final MacOS Sequoia 15.5 x86_64 @@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gam7 Version Check: Current: 5.35.08 - Latest: 7.13.03 + Latest: 7.14.00 echo $? 1 ``` @@ -73,7 +73,7 @@ echo $? Print the current version number without details ``` gam version simple -7.13.03 +7.14.00 ``` In Linux/MacOS you can do: ``` @@ -83,7 +83,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 7.13.03 - https://github.com/GAM-team/GAM +GAM 7.14.00 - https://github.com/GAM-team/GAM GAM Team Python 3.13.5 64-bit final MacOS Sequoia 15.5 x86_64 diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md index 84c6b44d..39abd29f 100644 --- a/wiki/_Sidebar.md +++ b/wiki/_Sidebar.md @@ -171,6 +171,7 @@ Service Account Access * [Users - Profile Photo](Users-Profile-Photo) * [Users - Shared Drives](Users-Shared-Drives) * [Users - Spreadsheets](Users-Spreadsheets) +* [Users - Tag Manager](Users-Tag-Manager) * [Users - Tasks](Users-Tasks) * [Users - YouTube](Users-YouTube)