The information in the datalayer can contain but is not limited to author, section, tags, or whether a story is a premium (paid) or not.

In order to have the information sent, the smartocto Tentacles script must be added to your website.

IMPORTANT: For clients that have implemented the smartocto Insights script, the _ain object can be used as a datalayer since it already contains the required meta-data. In that case please make sure that the Insights script loads before the Tentacles script on all article pages.

Please consult our Support team if you need more information.

Content of the datalayer

We recommend naming the datalayer smartoctoData, adding the following information:

{
  "postId": "[unique ID of the story]",
  "title": "[title of the story]", 
  "uri": "[canonical URL of the story, without any additional paramaters]"
  "pubDate": "[publish timestamp in ISO 8601 format: 2021-12-31T10:30:00+02:00]",
  "articleType": "[article type: article, story, news, blog, gallery, video...]",
  "articleAccess": "[indicates the type of article, it can be free or paid]",
  "authors": "[author name or comma-seperated names if more authors are signed]",
  "sections": "[Level1/Level2/Level3]",
  "tags": "[comma-separated list of story tags/keywords]"
}

All values must be of string type.

Required parameters

Here is the minimum set of required parameters for processing the story through the datalayer:

  • postId
  • title
  • uri
  • pubDate
  • articleType

For optional performance a few additional parameters should be added:

  • authors
  • sections
  • tags
  • articleAccess

Example

{
  "postId": "sd98ds9",
  "title": "PSV Eindhoven wins Champions League",
  "uri": "https://www.domain.name/category/story-title/sd98ds9/",
  "pubDate": "2021-12-31T10:30:00+02:00",
  "articleType": "article",
  "authors": "John Doe,Jan Janssen",
  "sections": "Sports/Soccer/Champions League",
  "tags": "soccer,champions league,psv",
  "articleAccess": "free"
}

 

Loading the datalayer object

To limit the sent and processed information to stories, it’s important that the smartocto datalayer is loaded and filled on story pages before the Tentacles script is loaded.

Please contact our Support team if you have any additional questions or concerns.