Issue
When setting up an Actions-based destination in Segment for a JavaScript website source, you may find that the mapping fails with a message stating no event matches the trigger condition Page Viewed. You might expect the default Page Viewed event to be available for mapping, but it is not detected.
Product
Twilio Segment
Environment
Segment Console
Cause
This behavior occurs because the JavaScript website source (analytics.js) is sending page calls, rather than track calls with the event name Page Viewed. Since the page call does not have an event name of Page Viewed, attempting to map using Page Viewed as the trigger event will fail.
Resolution
To resolve this issue:
- In the Segment Console, navigate to your destination mapping settings.
-
Instead of mapping to the event name
Page Viewed, create a mapping for the event typepage. - Save the mapping and test to confirm that events are now being picked up by the destination.
Additional Information
-
This is a common point of confusion, as
pagecalls are standard for website sources and do not use thePage Viewedevent name. - If you continue to experience issues after updating the mapping, review the event payloads in the Segment Debugger to confirm the event type being sent.