- 1 Minute to read
- Print
- DarkLight
Scroll Position (Outdated)
- 1 Minute to read
- Print
- DarkLight
The scroll position plugin 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.
Scroll Position has been replaced by the Scroll Depth feature.
Methods and properties
name
Get the name of the extension.
/**
* @type {string}
*/
wtSmart.extension.scroll_position.name;
version
Get the version of the extension.
/**
* @type {string}
*/
wtSmart.extension.scroll_position.version;
config
Set and get the current configuration of the extension.
roundResult: By default the scroll position in percent gets rounded up to full fives. Deactivate this option, to receive more detailed results.
pageHeight: Enter the parameter ID of the 'action parameter', which should be used for the absolute height of the page.
sendAsFigure: By default the scroll position gets send through a predefined Mapp Intelligence parameter. This parameter is configured as text and isn't changeable. You can define the scroll position as an additional "number" parameter(custom click parameter), to use it in more analyses.
/**
* @param {{
* [roundResult=true]: boolean,
* [pageHeight=""]: string,
* [sendAsFigure=""]: string
* }} [config]
*
* @returns {object}
*/
wtSmart.extension.scroll_position.config(config);
isActivated
Get the status, if the extension is enabled.
/**
* @returns {boolean}
*/
wtSmart.extension.scroll_position.isActivated();
activate
Activate the extension.
wtSmart.extension.scroll_position.activate();
deactivate
Deactivate the extension.
wtSmart.extension.scroll_position.deactivate();
simulate
Simulate an internal scroll or unload event.
/**
* @param {string} eventName (scroll | unload)
*/
wtSmart.extension.scroll_position.simulate(eventName);
Example
// is scroll position activated
var isActivated = wtSmart.extension.scroll_position.isActivated();
// set scroll position config
wtSmart.extension.scroll_position.config({
roundResult: false,
pageHeight: '16',
sendAsFigure: '17'
});
// get scroll position config
var scrollPositionConfig = wtSmart.extension.scroll_position.config();
// activate scroll position
wtSmart.extension.scroll_position.activate();
// deactivate scroll position
wtSmart.extension.scroll_position.deactivate();
// simulate an internal unload event
wtSmart.extension.scroll_position.simulate('unload');