Automate everyday Google Tag Manager tasks.
If you have a bunch of sites with the same or similar Google Tag Manager setup, and your daily job is to keep all containers in consistent state - make all needed changes only in one container, tests everything and then use ⚙️ gtm-gear to sync changes between containers.
Or if you have base set up for GA/GAds/DV360/Facebook/... you can once save it and then push to new client's GTM container with a few lines of code 💪.
Project is still in work the current version is 0.1
Main scenarios 🔥:
- Get tags, triggers, variables, built in variables, folders by API;
- Cache all data to reduce amount of requests;
- Limit request rate to 25 by 100 seconds as its default limit for GTM API;
- Update params you need;
- Set tags on pause;
- Create new workspaces;
- Copy tags between containers;
- Copy everything in version to other container;
- Check the difference between containers;
- Clean container: delete tags on pause, delete not used variables and triggers.
To get a local copy up and running follow these simple steps.
-
virtualenv --python=python3.8 .venv
-
source .venv/bin/activate
-
pip install git+https://github.com/ArtemKorneevGA/gtm-gear.git
-
Follow steps from the documentation
-
Set path to folder with
client_secrets.json
andtagmanager.dat
.In code:
os.environ["GTM_API_CONFIG_FOLDER"] = 'path'
For examples, please refer to the samples folder
Distributed under the MIT License. See LICENSE
for more information.
Artem Korneev - linkedin