The Python script for checking changes in the Google Tag Manager container and sending the notification email.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
LICENSE
README.md

README.md

GTMChangeNotification

The script checks for changes into Google Tag Manager container and sends a notification email when it was changed.

python gtmcn.py
	-g "GTM-A1B2C3, GTM-D4E5F6"
	-e "recipient1@example.com, recipient2@example.com"
	-n -l

Arguments

  • -g, --gtm Defines one or more Google Tag Manager container IDs.
  • -e, --email Defines one or more emails to send the notification.
  • -n, --notification Enables email notification.
  • -l, --log Enables logging.

SMTP server

The config.json file contains the SMTP server settings.

{
	"SMTP": {
		"SERVER": "smtp.gmail.com",
		"PORT": 587,
		"USER": "user",
		"PASSWORD": "password"
	},
	"NOTIFICATION": {
		"SENDER": "sender@email.com"
	}
}

For Windows users

All Python scripts are tested for running on GNU/Linux and MS Windows 10 with Python 3.6+. Follow these instructions to use on MS Windows OS.

  • Follow these Python 3 installation instructions and add Python to PATH
  • Download the get pip script and install with the command python get-pip.py
  • Install requests by using the command python -m pip install requests
  • Install argparse by using the command python -m pip install argparse