@schibstedspain/html-tagger
v2.0.1
Published
Tool to tagger the HTML of your webpage from a service
Downloads
6
Readme
html-tagger
Tool to tagger the HTML of your webpage from a service.
Use:
- Load the script with the tagger
tagger.umd.min.js
. That script expose the global objectwindow.SCM.Tagger
- Load After the first script other script with the tag´s object. And call to
window.SCM.Tagger()
example
Performance:
- It uses requestIdleCallback if supported, in order to only tag when the browser is idle. If not available, it tries to use requestAnimationFrame in order to tag elements smoothly.
- It uses MutationObserver if supported in order to only tag elements when these are added.
Debugger:
You can use this command in the console to check the tagging:
console.table(
Array.from(document.querySelectorAll('[data-tealium-tag]'))
)