Scenario: Segment visitors who wait 6 seconds
Scenario
You want to create a segment of visitors who wait 6 seconds on a page.
Summary of steps
- Use JavaScript to create a create a timeOnPage6Secs event tag to record when a timer fires.
- Deploy the event tag with your preferred tag manager.
- Create a TimeonPage6Secs segment that uses the event tag.
- Test your solution in Live Now.
Video: Create a segment of visitors who wait 6 seconds
Create a timeOnPage6Secs event tag
In your preferred code editor, develop and validate a timeOnPage6Secs event tag. For more information, see Adobe Launch instructions.
Predictive Engagement tracking snippet
If you deployed the Predictive Engagement tracking snippet, use the following example to create a timeOnPage6Secs event tag.
<script> ac('record', 'timeOnPage6Secs');</script>
In the example:
- ac('record') is the function name
- timeOnPage6Secs is your event tag
For more information about the available Journey JavaScript methods you can use to create event tags, see the Journey JavaScript SDK.
Messenger snippet
If you are a Genesys Cloud CX customer and you deployed the Messenger snippet, use the following example to create a timeOnPage6Secs event tag.
<script> Genesys("command", "Journey.record", { eventName: "timeOnPage6Secs"});</script>
In the example:
- Journey.record is the function name
- timeOnPage6Secs is your event tag
Deploy the event tag
Deploy your event tag using your preferred tag manager:
- Adobe Launch
- Google Tag Manager (Predictive Engagement tracking snippet deployments only)
Create a TimeonPage6Secs 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') or Journey.record call.
ImportantYou must create a visitor journey attribute of the Event name type. Do not use the Custom attribute type.
Test your solution in Live Now
- Open Live Now.
- Open your website.
- Start a visit and go to the page that you are tracking.
- Do nothing for 6 seconds.
- Refresh Live Now and verify that a new visitor was added to the TimeOnPage6Secs segment.A