Scenario: Engage visitors who scroll to the bottom of a page
Contents
Learn how to create a custom event tag and a corresponding segment in Genesys Predictive Engagement. Then, use that segment with an action map and see the visitors in Live Now that the action map engaged.
This article only applies to customers using web chat. If you are a Genesys Cloud customer, we encourage you to use the new web messaging feature to replace web chat.
Scenario
You created a webpage announcing a new product. You want to create a segment of those visitors 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 visitors.
- Test your solution in Live Now.
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 create event tags, see: Journey JavaScript SDK.
Deploy the event tag
Deploy your event tag using your preferred tag manager:
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.
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 selected by default.
- Click Configure and design the Webchat however you like.
Test your solution in Live Now
- Open Live Now.
- Open your website.
- Start a visit and go to the page that you are tracking.
- Scroll to the bottom.
- Refresh Live Now and verify that a new visitor appears and that the visitor was added to the ScrolltoBottom segment.

