2.0.4 • Published 22 days ago

gtm-batch-delete v2.0.4

Weekly downloads
17
License
GPL-3.0-or-later
Repository
github
Last release
22 days ago

gtm-batch-delete

Node gadget to delete elements from a GTM container JSON file, specified by an array of element IDs or element names.

Export a Google Tag Manager container then import a new version minus the elements you've specified.

Pre-requisites

Requires NodeJS

Optional installation via NPM

npm i gtm-batch-delete

Imported as a package

const gtmBatchDelete = require('gtm-batch-delete')
// To delete tags by ID
const cleansedContainer = gtmBatchDelete("./path/to/container.json", "tag", "1,2,3")
// To delete triggers by ID
const cleansedContainer = gtmBatchDelete("./path/to/container.json", "trigger", "1,2,3")
// Or if you want to use tag names instead.
const cleansedContainer = gtmBatchDelete("./path/to/container.json", "tag", "tag one,tag two,tag three")

Run via CLI

# To delete tags
node gtmBatchDelete.js --container ./path/to/container.json --type 'tag' --elements 1,2,3
# To delete triggers
node gtmBatchDelete.js --container ./path/to/container.json --type 'trigger' --elements 1,2,3
# Or if you want to use tag names instead
node gtmBatchDelete.js --container ./path/to/container.json --type 'tag' --elements 'tag one,tag two,tag three'
2.0.3

22 days ago

2.0.4

22 days ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago