Page Metadata
Page metadata scraping is being refactored. This documentation will be
updated to reflect the new implementation soon. :::
The SDK automatically collects page metadata from the DOM using configurable
sources. By default it reads from the GTM data layer
(<meta name="gtm-dataLayer">):
| Field | Data Layer Key |
|---|---|
page_title | gtmStoryTitle |
content_type | gtmPageType |
content_id | gtmBspStoryId |
publisher | gtmSiteName |
object_type | gtmPageType |
object_id | gtmBspStoryId |
context | gtmCategory |
Supported source types:
meta— reads from<meta name="key" content="value">dataLayer— reads from the GTM data layer meta tagselector— readstextContentfrom a CSS selectorattribute— reads an attribute from an element ("selector@attribute")
Any values you pass explicitly to track() override the auto-collected page
data.