Difference between revisions of "ATC/Current/SDK/autotrackScrollDepth"
From Genesys Documentation
m (Text replacement - "\|Platforms?=([^\|]*)PureCloud([\|]*)" to "|Platform=$1GenesysCloud$2") |
m (Text replacement - "\|Platform=([^\|]*)GenesysEngage-onpremises([\|]*)" to "|Platform=$1GenesysEngage-cloud$2") |
||
Line 6: | Line 6: | ||
|Dimension=Modules | |Dimension=Modules | ||
|ComingSoon=No | |ComingSoon=No | ||
− | |Platform=GenesysEngage- | + | |Platform=GenesysEngage-cloud, PureConnect, GenesysCloud |
|Section={{Section | |Section={{Section | ||
|sectionHeading=Description | |sectionHeading=Description |
Revision as of 02:30, July 25, 2020
This topic is part of the manual Journey JavaScript SDK for version Current of Genesys Predictive Engagement.
Learn how to configure which scroll milestones Genesys Predictive Engagement tracks on your websites, so you have more accurate page tracking information for use in segments and outcomes.
Description
The autotrackScrollDepth
module tracks when the user scrolls to see a specific percentage of a webpage. To use autotrackScrollDepth
, use the following options to configure the click events that you want to track:
- Config
- Callback
Signature
ac('load', 'autotrackScrollDepth', config, [callback]);
Example
ac('load', 'autotrackScrollDepth', {
scrollDepthEvents: [
{ percentage: 75, eventName: 'scroll_depth_75' },
{ percentage: 100, eventName: 'scroll_depth_100' }
]
}, function () {
console.log('"autotrackScrollDepth" has been loaded');
});
Config (required)
Description: identifies an array of scroll depths that should be tracked.
Type: object
Properties:
Name | Description | Type | Status | Default |
---|---|---|---|---|
percentage | A string that selects elements. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches | Number (0 - 100) | required | NA |
eventName | is a string that will be used as the event name when an element matching the selector is clicked. | String | optional | scroll_depth_<percentage>
eg if "percentage" = 75, eventName defaults to "scroll_depth_75" |
Example
{
scrollDepthEvents: [
{ percentage: 50 },
{ percentage: 100, eventName: 'viewed_full_page' },
]
}
Callback (optional)
When a module fully loads, callback is executed. No arguments are passed to the callback.
Comments or questions about this documentation? Contact us for support!