Knock provides opt-in, provider-agnostic tracking capabilities for your notifications. These are:
- Link tracking — Knock will wrap URLs in your notification and capture link-click events before directing your recipient to the destination.
- Open tracking — Currently for email channels only. Knock uses a 1x1 transparent "tracking pixel" to determine when a recipient opens and reads your email notifications.
Many of the providers Knock integrates with offer their own versions of open and link tracking. You can configure your channels to use provider-owned tracking in these cases.
With Knock tracking, you get the same features with cross-channel tracking events surfaced as first-class entities in a single place: your Knock account.
|Channel||Link tracking available?||Open tracking available?|
You can configure Knock tracking on a per-environment basis, using your channel's per-environment configurations. Open and link tracking will always default to
OFF when you first create a channel.
You can also configure Knock tracking on a per-workflow level. If a channel step in your workflow supports Knock tracking, you'll see tracking option toggles just below the channel selector form in the workflow editor. These toggles will reflect the environment-level channel configurations you have set until you modify them otherwise.
Step-level overrides allow you to opt-out of tracking for a specific workflow step, or vice versa.
Knock tracking events will be available in the message detail view in the Knock Dashboard.
When open tracking is enabled for an email channel, Knock will capture email-open actions as
message.read events. You'll see a "Read at" timestamp reflecting the time of latest open event and a "Message read" item in the timeline view for each open action.
When link tracking is enabled, Knock will capture link-click actions as
message.link_clicked events. You'll see a "Clicked at" timestamp reflecting the time of the latest link-click event and a "Message link clicked" item in the timeline view for each link-click action.
When link tracking is enabled for your channel, you can stitch link-click events into your workflows as a step condition. For example, you can require that at least one link in a previous channel step has been clicked for the current step to execute.
See the step conditions guide for more details.
If you use Knock webhooks, you can hook into the
message.link_clicked events captured via Knock tracking. See the outbound webhooks guide for more details.
When Knock renders a workflow step template into a notification message, it will additionally wrap URLs as trackable links. When a recipient opens one of these trackable links, Knock will record a link-click event before redirecting the user to the target destination. Knock defers the link-click event capture process, so redirects should be fast.
Knock is able to identify many types of URLs for tracking:
- Hyperlinks — Knock will replace HTML anchor tag and Markdown link target URLs with trackable links.
- Chat app JSON — Knock will traverse chat app JSON blobs (e.g. Slack Block Kit) and replace URL cards or anchor tags found within.
- Bare URLs — In Markdown templates, Knock will replace full-form URLs with trackable links wrapping the origin URL. For example,
There are two types of trackable links Knock may generate: standard and short. Standard links encode the target URL (and other event metadata) into a variable-length token added to the link path. Short links instead use a lookup key added to the link that maps to a record of the target URL. The short link lookup key will always be 10-characters in length, with short links always 31-characters long in total.
Given their brevity and consistent length, Knock will use short links for channels that often have character constraints. Specifically these are:
- All SMS channels
- WhatsApp chat channel
In all cases, Knock trackable links will use the
Knock uses a 1x1 transparent PNG image to power email open tracking, often called a "tracking pixel". When you enable open tracking for an email channel, we embed a link to this image in the footer of the email message. The URL to load the image contains an identifier we can use to associate the image with the notification. When your recipient opens the email and loads the image for view, we register an open event with the associated message.
Using tracking pixels to record email-open events has limitations. For one, it requires your recipients to use an HTML-enabled email client. In addition, many contemporary email providers and applications provide robust user privacy protections that purposefully limit open tracking capabilities. Some providers automatically block remote content (including images); others will cache images after an initial request, limiting our ability to track repeat opens.
Knock tracking tries to capture email-open events in as many possible cases, while still respecting end-user privacy restrictions.
Here are the email open tracking limitations we are currently aware of:
|Email provider / app||Limitation||Effect|
|Mail.app (iOS & macOS)||Optional remote content blocking||When enabled by the recipient, open tracking will not work.|
|iCloud Mail||Remote content blocking||This is enabled by default, and when enabled open tracking will not work.|
|Gmail (Android, iOS, Web)||Remote image caching||Gmail may preload the image, registering a false open event. Repeat email opens may not register.|
|Protonmail||Remote image caching||Images are always preloaded a single time following email delivery. Open tracking will not work.|