Skip to content

Instantly share code, notes, and snippets.

@r14c
Last active May 15, 2024 16:40
Show Gist options
  • Select an option

  • Save r14c/8c69a0570ef29d46b0b32076bf4044b3 to your computer and use it in GitHub Desktop.

Select an option

Save r14c/8c69a0570ef29d46b0b32076bf4044b3 to your computer and use it in GitHub Desktop.

Revisions

  1. r14c revised this gist Jun 1, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gtm-export-tags.js
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@
    for (let i = 0; i < qs.length; i += 1) {
    const name = qs[i].children[1].children[0].text
    const type = qs[i].children[2].textContent
    result.push(`${name}\t${type}`)
    result.push(`${(name || '').trim()}\t${(type || '').trim()}`)
    }
    console.log(result.join('\n'))
    }())
  2. r14c revised this gist Jan 13, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gtm-export-tags.js
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,7 @@
    * 2. set show rows = ALL
    * 3. "inspect elemement" > console
    * 4. paste this snippet
    * @link gemini://sunshinegardens.org/~xj9/paste/3b1e5faf0a5767827f8594900b3f0d366c2460edf74f2e711ac3512e2e7df383.gmi
    */
    (function () {
    const qs = document.getElementsByClassName('wd-tag-row')
  3. r14c created this gist Jan 13, 2021.
    16 changes: 16 additions & 0 deletions gtm-export-tags.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    /**
    * 1. go to google tag manager > workspace > tags
    * 2. set show rows = ALL
    * 3. "inspect elemement" > console
    * 4. paste this snippet
    */
    (function () {
    const qs = document.getElementsByClassName('wd-tag-row')
    let result = []
    for (let i = 0; i < qs.length; i += 1) {
    const name = qs[i].children[1].children[0].text
    const type = qs[i].children[2].textContent
    result.push(`${name}\t${type}`)
    }
    console.log(result.join('\n'))
    }())