Last active
March 10, 2020 00:41
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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