Scenario: Segment visitors who wait too long

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.

Create a custom event tag and a corresponding segment in Genesys Predictive Engagement, and see visitors assigned to that segment in LiveNow.

Scenario

You want to create a segment of visitors who are lingering too long on a page.


Summary of steps

  1. Use JavaScript to create a timerHasFired event tag to record when a timer fires.
  2. Deploy your event tag with your preferred tag manager.
  3. Create a segment that uses the event tag.
  4. Test your solution in LiveNow.

Create a timerHasFired event tag

In your preferred code editor, develop and validate a timerHasFired event tag.
<script>
  ac('record', 'timerHasFired', {'timerName': 'gtm'});
</script>

In the example:

  • ac('record') is the function name.
  • timerHasFired is your event tag.
  • {'timerName':'gtm'} is a custom attribute.

For more information about the available Journey JavaScript methods you can use to create event tags, see the 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 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 Timerhasfired segment

1

  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 event name of 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.
  • Genesys Predictive Engagement uses initial caps. If you created an event with the name timerHasFired, in the Value box, type Timerhasfired.

Test your solution in LiveNow

1

  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 Timerhasfired segment.
Retrieved from "https://all.docs.genesys.com/ATC/Current/Event/Wait_too_long (2021-04-10 15:27:07)"