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 for version Current of Altocloud.

Learn how to create a custom event tag, build a corresponding segment in Altocloud, use that segment with an action map, and see users engaged by that action map in LiveNow.


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

  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 users.
  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 build 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 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


  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 automatically selected.
  6. Click Configure and design the Webchat however you like.

Test your solution in LiveNow

  1. Open Live Now.
  2. Open your website.
  3. Initiate 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 user appears and that the user has been added to the ScrolltoBottom segment.