Scenario: Engage users who scroll to the bottom of a page
From Genesys Documentation
This topic is part of the manual Event tracking with tag managers for version Current of Genesys Predictive Engagement.
Contents
Learn how to create a custom event tag, build a corresponding segment in Genesys Predictive Engagement, use that segment with an action map, and see users engaged by that action map in LiveNow.
Scenario
You have created a webpage announcing a new product. You want to build a segment of those customers who view the entire page and start a chat with them.
Summary of steps
- Use JavaScript to create a ScrollToBottom event tag.
- Deploy your event tag with your preferred tag manager.
- Create a segment that uses the event tag.
- Create an action map to engage your users.
- Test your solution in LiveNow.
Create a ScrollToBottom event tag
In your preferred code editor, develop and validate a ScrolledToBottom event tag. For example:
<script>
ac('dom', 'ready', function() {
$(window).scroll(function(){
timeout = setTimeout( function() {
if( $(window).scrollTop() + $(window).height() > $(document).height() - 100 ) {
ac('record', 'scrollToBottom', 'User scrolled to bottom');
console.log('User scrolled to bottom');
}
})
})
})
</script>For more information about the available Journey JavaScript methods you can use to build event tags, see: Journey JavaScript SDK.
Deploy the event tag
Deploy your event tag using your preferred tag manager:
Important
The JavaScript code that you define for an event tag will be executed every time a customer visits a page that matches the execution condition you defined for the tag (either the specific page URL or the presence of an HTML element.)Create a ScrollToBottom segment
- In Segments, under Visitor journey, click Add first activity.
- In the Attribute box, select Event name.
- In the Operator box, select equals.
- In the Value box, type the name for your tag as you defined it in your ac('record') call.
Important
You must create a visitor journey attribute of the Event name type. Do not use the Custom attribute type.Create the ScrolledToBottom action map
- In Action maps, click Create action map.
- Name the action map ScrolledToBottom.
- Under Select trigger, click Segment match.
- Click Select segments and select the ScrolledToBottom segment.
- Under Configure User Engagement, Webchat is automatically selected.
- Click Configure and design the Webchat however you like.
Test your solution in LiveNow
- Open Live Now.
- Open your website.
- Initiate a visit and go to the page that you are tracking.
- Scroll to the bottom.
- Refresh Live Now and verify that a new user appears and that the user has been added to the ScrolltoBottom segment.
Comments or questions about this documentation? Contact us for support!

