Scenario: Engage users who scroll to the bottom of a page

From Genesys Documentation
Jump to: navigation, search
This topic is part of the manual Event tracking with tag managers for version Current of Genesys Predictive Engagement.

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 LiveNow that the action map engaged.


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

  1. Use JavaScript to create a ScrollToBottom event tag.
  2. Deploy your event tag with your preferred tag manager.
  3. Create a segment that uses the event tag.
  4. Create an action map to engage your visitors.
  5. Test your solution in LiveNow.

Create a ScrollToBottom event tag

In your preferred code editor, develop and validate a ScrolledToBottom event tag. For example:

ac('dom', 'ready', 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');

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:

The JavaScript code that you define for an event tag runs every time a visitor is on a page that matches the run condition defined for the tag (either the specific page URL or the presence of an HTML element).

Create a ScrollToBottom segment


  1. In Segments, under Visitor journey, click Add first activity.
  2. In the Attribute box, select Event name.
  3. In the Operator box, select equals.
  4. In the Value box, type the name for your tag as you defined it in your ac('record') call.
You must create a visitor journey attribute of the Event name type. Do not use the Custom attribute type.

Create the ScrolledToBottom action map


  1. In Action maps, click Create action map.
  2. Name the action map ScrolledToBottom.
  3. Under Select trigger, click Segment match.
  4. Click Select segments and select the ScrolledToBottom segment.
  5. Under Configure User Engagement, Webchat is selected by default.
  6. Click Configure and design the Webchat however you like.

Test your solution in LiveNow

  1. Open Live Now.
  2. Open your website.
  3. Start a visit and go to the page that you are tracking.
  4. Scroll to the bottom.
  5. Refresh Live Now and verify that a new visitor appears and that the visitor was added to the ScrolltoBottom segment.