-
Notifications
You must be signed in to change notification settings - Fork 0
Tracking and Number Routing
This is the core of the plugin.
I want Adaptive Customer Engagement to capture useful first-party signals without becoming invasive or fragile.
The public tracking endpoint accepts these event types:
pageviewclick_to_calldownloadform_submitchat_startchat_message
In practice, the current build is centred on pageviews, click-to-call events, downloads, and optional native form submissions.
The plugin keeps a first-party session UUID and visitor UUID so I can follow journeys over time without leaning on third-party analytics platforms.
Each session can include:
- landing path
- first URL and referrer
- UTM values
- location and provider data where enrichment is enabled
- linked company data where that match exists
- engagement events and commerce-interest metadata
Numbers are stored as rules, not just contacts.
Each number record can include:
- a label
- a display number
- an E.164 number
- source-type and source-value matching
- page-match type and value
- campaign matching
- default and active state
- priority
- Amazon Connect phone number and contact flow identifiers
The public number resolver looks at the current request context and returns the most appropriate active number.
That context can include:
- current path
- UTM source
- UTM campaign
The result comes back with:
- internal number ID
- display number
- E.164 number
- label
I generally treat number setup like this:
- create one clean default number as the safe fallback
- add campaign-specific numbers where I need tighter attribution
- add page-matching rules only where they are meaningful
- keep priorities deliberate so overlap is easier to reason about
- store Amazon Connect identifiers early, even if the live integration is not switched on yet
The normal placeholder pattern is:
<span data-ace-phone="default">Loading…</span>
<a href="#" data-ace-phone-link="default">Call us</a>That lets the frontend script replace the public number without hard-coding multiple copies through a theme.
Call data is already part of the plugin model through the ace_calls table and the calls reporting surface. The full Amazon Connect import and matching workflow is still a later phase, but the schema and setup screens are already there so I do not have to retrofit them later.