Skip to main content

Generic tool to calculate size of each tag, trigger and variable assimilated in a GTM container

Project description

GTM Healthcheck

GTM Healthcheck is a command-line tool that analyzes a Google Tag Manager (GTM) container export (.json file) and calculates the size (in KB) of each tag, trigger, and variable.

This helps marketers, analysts, and developers clean up their containers by identifying old, bloated, or unused elements — and freeing up space for new tags with just one command.


🚨 Problem It Solves

Current process:

  • You pause or delete a tag/trigger/variable manually in a dummy container and publish the container.
  • Check if the container size decreased in version history.
  • Repeat over and over — very time-consuming, takes upto 3-4 hrs or more depending upon container size.

With GTM Healthcheck:

  • Just install and run our automation.
  • It gives you a complete CSV report of how much space each element takes.
  • Done in under a minute — no guesswork.

📦 Installation

Install the tool using below command:

pip install gtm-healthcheck

🚀 Usage

1. Export your container from GTM

  • Go to Admin > Export Container in your GTM account.
  • Save the .json file locally (e.g., container.json).

2. Run the tool

healthcheck <container.json>

Replace <container.json> with actual gtm container filename which you have downloaded

This generates a CSV report in the current directory (default: healthcheck.csv)


📊 Output Format

The output CSV includes:

Type Name Size (KB) % Occupied
Tag GA4 - Pageview 2.87 3.5%
Trigger Click - All Buttons 1.25 1.2%
Variable Custom JavaScript Helper 3.14 0.6%

This allows you to:

  • Identify heavy tags or unused variables
  • Sort/filter by size or type
  • Share with your team or agency

✅ When Should You Use This?

  • Before publishing large GTM changes
  • When you're hitting GTM container size limits
  • To audit old containers for optimization
  • During migration/cleanup projects
  • As part of your QA process

🔐 Data Privacy

This tool works locally on your machine and does not send any data externally. Your GTM export stays secure and private.


❤️ Built For

Marketers • Analysts • Developers
To save time, simplify GTM audits, and make container management efficient.


Legal Notice

This tool is an internal property of WebEngage and is strictly for auditing purposes. It is owned by Nipun Patel (Copyright) and any misuse, unauthorized distribution, or external sharing will lead to legal consequences.


© WebEngage. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gtm_healthcheck-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gtm_healthcheck-0.1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file gtm_healthcheck-0.1.1.tar.gz.

File metadata

  • Download URL: gtm_healthcheck-0.1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for gtm_healthcheck-0.1.1.tar.gz
Algorithm Hash digest
SHA256 17dcdd13767744dc8634089b37e3547e83a69411e9708dcdb8d18b07d4b8a093
MD5 c08a0124f6a91980f2c941ac5d3bf01c
BLAKE2b-256 93134ae59a60b73bdf64bcc149a0ff501d162f08feee84c684198b62c2724a54

See more details on using hashes here.

File details

Details for the file gtm_healthcheck-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gtm_healthcheck-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b688cfeec3f168de1ac641585cbc70c48572fd060d57cd9bc4aae71fb6c0d7c3
MD5 1fc8556f9396c4d8f968aca7e6ec7446
BLAKE2b-256 25c294f6895978f45acb907a9c56fef37782059e0df3eb39cbefd8afaa1dfb9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page