To configure analytics providers, ad servers, or any other third party integrations, Marfeel uses metadata - a detector to identify elements in a publisher's web code when Marfeel knows where the metadata is saved.
Every time there's a script, Marfeel scans it for active metadata. Marfeel then detects, parses, extracts, and stores this information so it can be used client-side, and replicated in the Marfeel solution with the same logic the publisher has in their website.
Metadata is detected and generated differently for section mosaics, article details, and Touch. To learn more about each, click one of the links below:
Generating metadata from Gutenberg
The logic inside this class is to cache metadata of the same URL into an object and avoid reparsing the DOM (Marfeel stores metadata properties inside the DOM).
After parsing the metadata, the respected metadata properties are removed from the DOM since they're kept in a JS object.