GTM Command Line Interface
Command Line Interface for Google Tag Manager
Installation
Install the binary CLI:
$ gem install gtm
Create and download client_secret.json from Google Developer API Console.
Usage
Pull tags
$ gtm pull data/
pulling tags from account 202287 into data/202287/de_nec_package/tags ................[OK]
pulling tags from account 202287 into data/202287/de_tc_kreuzfahrten/tags ......[OK]
pulling tags from account 202287 into data/202287/de_tc_kreuzfahrten_booking/tags ...[OK]
DONE
pulling tags from account 31742 into data/31742/ch_nec/tags ...........[OK]
pulling tags from account 31742 into data/31742/at_nec/tags .........................[OK]
pulling tags from account 31742 into data/31742/at_nec_booking/tags .................[OK]
pulling tags from account 31742 into data/31742/ch_nec_booking/tags .....[OK]
DONE
$ gtm pull data/202287/
pulling tags from account 202287 into data/202287/de_nec_package/tags ................[OK]
pulling tags from account 202287 into data/202287/de_tc_kreuzfahrten/tags ......[OK]
pulling tags from account 202287 into data/202287/de_tc_kreuzfahrten_booking/tags ...[OK]
DONE
$ gtm pull data/202287/de_nec_package/
pulling tags from account 202287 into data/202287/de_nec_package/tags ................[OK]
DONE
$ gtm pull data/202287/de_nec_package/tags/facebook.html
pulling tags from account 202287 into data/202287/de_nec_package/tags .[OK]
DONE
$
Push tag
$ gtm push data/202287/de_tc_generic/tags/facebook.html
pushing tag data/73581867/dudda_und_dudda_de/tags/test.html to account 73581867 into container 1205187 [OK]
DONE
$
Contributing
- Fork it ( https://github.com/[my-github-username]/gtm/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request