The Content Engagement extension measures the percentage of an article read by the end-user.

It requires additional setup. Learn more about it here.

Overview

ValueDescriptionData valueDefault valueRequired
selectorSpecifies the element to be measured. You can pass the CSS selector of the element.Stringcurrent element-
shadowRootIf your content to be measured is inside a shadow DOM element, specify the CSS selector of the shadow DOM element. If you have defined a CSS selector as the "selector", it will refer to the "shadowRoot" selector you have defined.Stringempty-
nameDefaults to current page name. Specifies the name of the element to be measured. Alternatively, the plugin uses the name of the current page.Stringcurrent page name-
percentageStepsInAnalyticsDefaults to 5. Defines the percentage intervals to be reported in Mapp Intelligence (e.g., five means that the count is incremented in five steps).Number5-
sendContentEngagement

Specifies the event that triggers the request to Mapp Intelligence.

0: The user clicks a link, reloads the page or is inactive until the end of the session.
1: The user exceeds a certain percentage (e.g., all 25 % of the element).
2: After a certain number of seconds (e.g., every 30 seconds).

Number0-
percentageReachedIf you specify "percentage reached" as the event trigger, enter the desired percentage here (e.g., at 25%, the event is triggered after every 25%).Number25-
secondsReachedIf you specify "seconds reached" as the event trigger, define the desired interval of seconds here (e.g., at 30 the event is triggered every 30 seconds).Number30-
largeBrowserResolutionSpecifies the browser resolution for large browsers in pixels (greater than or equal to the specified number of pixels).Number1080-
largeBrowserSecondsSpecifies the seconds to mark a section of the element as read on small browser resolutions.Number20-
mediumBrowserResolutionSpecifies the browser resolution for medium-sized browsers in pixels (greater than or equal to the specified number of pixels).Number700-
mediumBrowserSecondsSpecifies the seconds to mark a section of the element as read on medium browser resolutions.Number10-
smallBrowserResolutionSpecifies the browser resolution for small browsers in pixels (greater than or equal to the specified number of pixels).Number400-
smallBrowserSecondsSpecifies the seconds to mark a section of the element as read on small browser resolutions.Number5-

Implementation Example

<template>
  <a href="#" ref="content_engagement_element">Content Engagement</a>
</template>
 
<script>
export default {
  name: "example",
  mounted() {
    this.$webtrekk.extension("content_engagement"); // activate content engagement
    this.$webtrekk.extension("content_engagement", "add", {
      selector: this.$refs.content_engagement_element,
      name: "name of the element",
      config: {
        percentageStepsInAnalytics: 5,
        sendContentEngagement: 1,
        percentageReached: 25,
        secondsReached: 30,
        largeBrowserResolution: 1080,
        largeBrowserSeconds: 5,
        mediumBrowserResolution: 700,
        mediumBrowserSeconds: 5,
        smallBrowserResolution: 400,
        smallBrowserSeconds: 5
      }
    });
  }
};
</script>
XML
<template>
  <div
    v-webtrekk.content_engagement="{
      name: 'name of the element',
      config: {
        percentageStepsInAnalytics: 5,
        sendContentEngagement: 1,
        percentageReached: 25,
        secondsReached: 30,
        largeBrowserResolution: 1080,
        largeBrowserSeconds: 5,
        mediumBrowserResolution: 700,
        mediumBrowserSeconds: 5,
        smallBrowserResolution: 400,
        smallBrowserSeconds: 5
      }
    }"
  >
    content
  </div>
</template>
XML