Skip to content

Instantly share code, notes, and snippets.

View loldenburg's full-sized avatar

Lukas Oldenburg loldenburg

View GitHub Profile
@hitGovernor
hitGovernor / tealium_assetScraper.js
Last active March 26, 2021 21:29
Scrapes the Tealium IQ (TiQ) web interface to retrieve all Data Layer variables, Load Rules, Tags, and Extensions. Output is written to the browser console either using console.table() or as a comma-delimited string, suitable for copy/paste use. To use, you must be logged into TiQ, viewing the Data Layer tab. Feedback is appreciated.
// if the element exists, returns the innerText, otherwise an empty string
function getInnerText(ele) {
if (ele) {
return ele.innerText;
}
return "";
}
// executes the query selectors and builds the output