@schibstedspain/html-tagger

Tool to tagger the HTML of your webpage from a service

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@schibstedspain/html-tagger
2.0.15 years ago7 years agoMinified + gzip package size for @schibstedspain/html-tagger in KB

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 object window.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]'))
)