One of the most common tasks is determining which device was used to open or click an email from your campaign. While there isn't a 100% reliable method, here are a few approaches to help you and have a clear understanding of the topic.
The data we're working with
In the session_start and session_end events, the device attribute indicates the device that started the session. You won't find this attribute in campaign events, so your main clue there is the user-agent.
Read more about these events and their attributes in System Events.
User agent
The user-agent strings are a global, standardized HTTP header, though vendors heavily customize them. It is set by the software that fetches the asset (image pixel) in case of opened events or follows the link in case of clicked events - that is, the recipient's email client, an in‑app webview/browser, or an intermediary proxy/scanner (for example, Gmail image proxy, Apple Mail Privacy Protection, corporate security bots).
Bloomreach only reads this header from the incoming request and stores it on the campaign event.
Example
Gmail often fetches images through Google's proxy, which can trigger opens before a human can view them. In those cases, the user-agent commonly includes "GoogleImageProxy," because the request originates from Google's proxy, not the end user's device.
Option 1 - Looking for keywords
The first approach involves creating an event segmentation for the campaign event containing 3 different segments: Desktop, Mobile, Tablet. In each segment, look for keywords using the "contains" operator. Here are some examples:
Mobile (phones)
- Android, Mobile, iPhone, CPU, iPhone OS, iOS, Mobile Safari
- CriOS, FxiOS, EdgiOS, OPiOS (Chrome/Firefox/Edge/Opera on iOS)
- EdgA (Edge on Android), SamsungBrowser, UCBrowser, MiuiBrowser, HuaweiBrowser, VivoBrowser, OppoBrowser
Desktop
- Windows, WOW64, Win64; x64
- Macintosh; Intel Mac OS X, Mac OS X
- Edg/ (Edge desktop), Chrome/, Safari/, (without Mobile), Firefox/, Gecko/20100101, Version/, Safari/ (Safari desktop), OPR/ (Opera)
Tablet
- iPad, Tablet
- Android present but "Mobile" missing (common on tablets)
Note
When an email is opened in Gmail, the user-agent value in the open event will include "GoogleImageProxy."
However, Gmail uses the same user-agent string across all its environments - desktop, mobile app, and mobile web. As a result, it's not possible to reliably identify the specific device a recipient used when the email was opened.
Option 2 - Using the session_start event
This is unfortunately not applicable for open events, but as previously mentioned, we have device information in the session_start event.
Instead of campaign events, you can count session_start that happened within 1 minute (or 0-5 minutes) of the last campaign click.
Although you can never be certain, the session likely began with that specific click.
Report
See the following report setup where:
- You count the session_start events.
- Event expression - the time between the session start and the click event is less than 1 minute.
- In rows, you drill down the report by the last campaign name when the status is clicked.
- In columns, drill down by the session_start's event attribute device.
Event expression
The event expression where we calculate the difference between the session_start timestamp and the last campaign click would look like this:
(timestamp - last(campaign.timestamp)) / 60The number 60 represents the number of seconds in a minute, so the output is converted to minutes.
Note
It is important to note that the session_start events coming from JS SDK (your website) will contain the device attribute with the following values:
- iPad
- iPhone
- Android
- Other -> Meaning desktop
However, if they are injected from your mobile SDK, this device attribute might be missing, and it will have a device_type value instead. An event with this attribute is automatically considered a mobile device session. Keep this in mind while creating the report and adjust it to your specific needs.
Summary
Identifying the device used to open or click an email is never fully precise, and user-agent strings are becoming increasingly unreliable due to proxies, privacy features, and user-agent reduction. It is advisable to validate patterns against your own project's data and adjust the approach based on your business needs.