--- title: "Step 2: Configuring and Activating the Plugin" slug: "scroll-depth-step-2-configuring-and-activating-the-plugin" updated: 2024-03-22T10:32:03Z published: 2024-03-22T10:32:03Z canonical: "docs.mapp.com/scroll-depth-step-2-configuring-and-activating-the-plugin" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Step 2: Configuring and Activating the Plugin In this section, you will find the steps to integrate the plugin based on the used pixel integration. The scroll depth extension is used to record how far users scroll down on a web page. This is a reference value that is of interest when you wish to find out more about user behavior. Learn more [here](/v1/docs/what-percentage-of-each-page-has-been-seen). The predefined IDs are assigned to each parameters: - Event parameter 501: Scroll Depth (Figure) - Event parameter 502: Page Length - Event parameter 540: Scroll Depth ## Methods and properties ### name Get the name of the extension. ```javascript /** * @type {string} */ wtSmart.extension.scroll_depth.name; ``` ### version Get the version of the extension. ```javascript /** * @type {string} */ wtSmart.extension.scroll_depth.version; ``` ### config Set and get the current configuration of the extension. - **roundResult**: By default the scroll depth in percent gets rounded up to full fives. Deactivate this option, to receive more detailed results. ```javascript /** * @param {{ *      [roundResult=true]: boolean * }} [config] * * @returns {object} */ wtSmart.extension.scroll_depth.config(config); ``` ### isActivated Get the status, if the extension is enabled. ```javascript /** * @returns {boolean} */ wtSmart.extension.scroll_depth.isActivated(); ``` ### activate Activate the extension. ```javascript wtSmart.extension.scroll_depth.activate(); ``` ### deactivate Deactivate the extension. ```javascript wtSmart.extension.scroll_depth.deactivate(); ``` ### simulate Simulate an internal *scroll* or *unload* event. ```javascript /** * @param {string} eventName (scroll | unload) */ wtSmart.extension.scroll_depth.simulate(eventName); ``` ### Example ```javascript // is scroll depth activated var isActivated = wtSmart.extension.scroll_depth.isActivated(); // set scroll depth config wtSmart.extension.scroll_depth.config({    roundResult: false }); // get scroll depth config var scrollDepthConfig = wtSmart.extension.scroll_depth.config(); // activate scroll depth wtSmart.extension.scroll_depth.activate(); // deactivate scroll depth wtSmart.extension.scroll_depth.deactivate(); // simulate an internal unload event wtSmart.extension.scroll_depth.simulate('unload'); ``` Integrate the Scroll Depth plugin into the container in which the webpage to be measured is located. To add plugins the desired container, proceed as follows: 1. In the container overview, select the required container by clicking the corresponding entry. 2. Click **Add Plugin**. You will be forwarded to the overview of all available plugins. 3. Select **Scroll Depth** plugin by clicking the appropriate button. The plugin configuration dialog opens. ![image2022-6-2_14-38-13.png](https://cdn.document360.io/554b9b98-6720-4d8b-9919-c7b203d72648/Images/Documentation/576348dd-7723-4221-9d4d-a3febe78be62.png) 4. Now enter the following information: | Parameter | Description | | --- | --- | | Round up scroll depth | Activate this option to round up the percentage scroll depth to full fives. | 5. In the **Assign rules** area, you define the page areas on which the measurement is to be carried out. 6. Click **Add plugin**. 7. Finally, click **Publish** to publish your container including the newly added Scroll Depth plugin. 1. Download the JavaScript file from the [download area](/v1/docs/scroll-depth-technical-requirements-and-download). 2. In the JavaScript file **pixel-scrolldepth.min.js**, make the following adjustments: **Example** ```javascript window.wt_scrolldepth = function(conf) { if (conf.mode === "page" && conf.type === "after" && conf.requestCounter === 1) { var scrollDepthConfig = { roundResult: true   };   // ... } }; ``` | Parameters | Description | | --- | --- | | roundResult | true = The percentage scroll depth is rounded up to full fives. false = To get more accurate results, deselect this option. | 3. Store the function **wt_scrolldepth** or the script file globally so that it can be found under the object "window". 4. The parameter **executePluginFunction** is used for the activation itself. This can be set either in the configuration variable (webtrekkConfig) in the global pixel file ("webtrekk_v3.js") or as a parameter of a page-specific pixel object. **Example Global Configuration** ```javascript var wt = new webtrekkV3(); wt.contentId = "de.startseite"; wt.executePluginFunction = "wt_scrolldepth"; wt.sendinfo(); ``` **Example page-specific Confguration** ```javascript var webtrekkConfig = { trackId: "111111111111111", trackDomain: "track.webtrekk.net", domain: "www.website.com", executePluginFunction: "wt_scrolldepth" }; ``` If you want to measure the data on all your pages, we recommend the global integration. The page-specific configuration is used for the measurement of individual pages.