Delivery record is assigned two unique slugs at creation time — one for opens and one for actions — that power engagement tracking without any additional configuration.
How Tracking Works
EachDelivery record stores two URL-safe identifiers:
| Field | Purpose |
|---|---|
open_slug | Recorded when the recipient opens or views the notification. |
action_slug | Recorded when the recipient clicks the call-to-action. |
Tracking Routes
The following routes are registered automatically by the package:| Method | Path | Name | Description |
|---|---|---|---|
GET | /o/{slug} | notification-center.track.open | Records an open event for the matching delivery. |
GET | /a/{slug} | notification-center.track.action | Records an action event for the matching delivery. |
GET | /notifications/{id} | notification-center.notifications.render | Renders the full notification content for web-based channels. |
The Event Model
Every tracking interaction creates anEvent record linked to the delivery:
Google Analytics GA4 Integration
Notification Center can automatically include the Google Analyticsgtag.js snippet in rendered notifications. Set your GA4 Measurement ID in your environment:
GOOGLE_ANALYTICS_ID is set, the gtag.js script is injected into notifications rendered via the /notifications/{id} route. Page views and events fired within the rendered notification will flow into your GA4 property.
GA4 integration applies to web-rendered notifications (the
renderNotification route). Push and channel-native deliveries (SMS, WhatsApp, etc.) are tracked exclusively through the slug-based open and action routes.Viewing Tracking Data in Nova
Open a notification
Navigate to Notifications in the Nova sidebar and select a published notification.
View deliveries
The Deliveries relationship panel lists every delivery record with its current status (
Pending, Sent, Opened, Verified, etc.).Service actions
TrackEvent
Opscale\NotificationCenter\Services\Actions\TrackEvent is the internal service that records delivery lifecycle events. It is registered as an event listener for both NotificationSent and NotificationFailed Laravel events, so delivery statuses update automatically on every send.
It can also be called directly to record custom events:
EnrichGeoData
Opscale\NotificationCenter\Services\Actions\EnrichGeoData enriches an existing Event record’s payload with geolocation data from ipgeolocation.io. It requires an API key set via:
ipgeolocation.api_key is not part of the default published config. Add it manually if you want to use geo enrichment.