Skip to content

Instantly share code, notes, and snippets.

@MatthewDaniels
Last active March 10, 2020 00:41
Show Gist options
  • Save MatthewDaniels/5d5fff74a1f81dc8dd819b180321c496 to your computer and use it in GitHub Desktop.
Save MatthewDaniels/5d5fff74a1f81dc8dd819b180321c496 to your computer and use it in GitHub Desktop.
Iterates all of the dimensions in the edit dimensions list in Google Analytics (only accounts for users with edit rights) & outputs the list, MINUS the dimension number
// Iterates all of the dimensions in the edit dimensions list in Google Analytics (only accounts for users with edit rights) & outputs the list, MINUS the dimension number
let list = document.querySelectorAll('.ID-editDimension > a');
list.forEach((value,key) => { let r = /(?:\d+\. )?(.*)/i; let b = r.exec(value.text); if(b) console.log(b && b[1]) });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment