Tracking
What became of the mail this mailbox sent.
Tracking tools
| Tool | What it does |
|---|---|
| getEmailTracking | Whether one message was opened, by whom, how often, and which links were followed. Takes a thread id, an RFC Message-ID or a tracking id. |
| getFileDownloads | The files sent as download links on a thread: filename, size, how many times each was downloaded, when the last download was, and whether the link is still live. Takes a thread id. |
| listTrackedEmails | Messages sent with tracking on, newest first, a page at a time, filtered by whether they were opened or clicked. |
| getEngagementStats | Open and click rates over a window, with the top links, the clients, how many fetches were filtered out, and how the files sent as download links were downloaded. |
| listTrackingHits | Every open and click of one tracked message, newest first, a page at a time: when, the reader, the client, the device, the place and the link followed. includeMachine adds the fetches that did not count. |
These see only mail sent with tracking on, which is off unless it was turned on for the address the mail was sent from, for the catch-all that caught that address, or for that one message. getEmailTracking says "nothing tracked for that message" rather than reporting zero opens. The phrases "nobody opened it" and "we were not recording" are different answers, and a tool that gives the first for the second lies about the recipient.
getFileDownloads counts people, not scanners or link previewers, and it never names who downloaded a file, because a download link is one URL for every recipient of the message. Files attached inside a message are not listed, since nothing is recorded when those are opened, so an empty answer means "no download links on this thread" and not "nobody opened the attachment".
Every rate is over TRACKED messages, never over all sent mail. A mailbox that tracks one message in ten has an open rate for those ten; dividing by everything it ever sent produces a number that falls each time somebody sends an untracked reply, which is not a fact about how their mail is read.
The counts leave out scanners and privacy proxies, and each report states how many were excluded. Opens seen through Gmail’s image proxy do count, because a person displayed the message, but the proxy caches, so a count through Gmail is a floor rather than a total.
Reference
getEmailTracking
Whether a message this mailbox sent has been opened, by whom, how many times, and which links were followed. Give it a thread id, an RFC Message-ID, or a tracking id. address keeps only what one address sent. Returns nothing for a message that was sent without tracking on.
Inputs
threadIdstringmessageIdstringtrackingIdstringaddressstring- 3 to 320 characters
Also available in
getFileDownloads
Which files this mailbox sent as download links on a thread, and whether anyone has fetched them: filename, size, download count, when the last download was, and whether the link is still live or revoked. Give it a thread id. Downloads count people, not scanners or link previewers, and a download cannot be tied to one recipient because every recipient gets the same link. Files sent inside the message rather than as links are not listed, because nothing is recorded when those are opened.
Inputs
threadIdstringRequired
listTrackedEmails
Messages this mailbox sent with tracking on, newest first, one page at a time. Filter by whether they were opened or clicked to answer questions like "what have I sent that nobody has read". address keeps only what one address sent. minutes sets a shorter window than days, and since and until, ISO 8601 instants at most 366 days apart, set it outright: since is where it starts and until where it ends, now by default. When more follow, the last line gives a cursor: call again with it, and the same filters, for the next page, until no cursor is given.
Inputs
daysinteger- At least 1At most 365Default
30 minutesintegerThe window in minutes, such as 60 for the last hour. It wins over days.
At least 1At most 527040sincestringWhere the window starts, as an ISO 8601 instant. It wins over days and minutes.
Formatdate-timeuntilstringWhere the window ends, as an ISO 8601 instant, not included, now by default. Only with since.
Formatdate-timegrainstringStart the window at the start of a minute, hour or day in the reader's time, as the Tracking page does.
One of"minute""hour""day"offsetMinutesintegerThe reader's offset from UTC in minutes, so a day starts at their midnight.
At least -840At most 840openedbooleanclickedbooleanaddressstring- 3 to 320 characters
limitinteger- At least 1At most 200Default
20 cursorstring
Also available in
- API
GET /trackingGET /tracking/{id}- TypeScript
tracking.list()tracking.listAll()tracking.iterate()tracking.get()- Python
tracking.list()tracking.list_all()tracking.iterate()tracking.get()- Ruby
tracking.listtracking.list_alltracking.iteratetracking.get- PHP
tracking->listtracking->listAlltracking->iteratetracking->get- Go
Tracking.ListTracking.ListAllTracking.IterateTracking.Get- Java
tracking().listtracking().listAlltracking().iteratetracking().get- C#
Tracking.ListAsyncTracking.ListAllAsyncTracking.IterateAsyncTracking.GetAsync
getEngagementStats
Open and click rates for mail this mailbox sent, over a window, and how the files it sent as download links were fetched: how many links went out, how many were downloaded, and the files downloaded most. Rates are over TRACKED messages only, never over all sent mail. address counts only what one address sent. minutes sets a shorter window than days, since and until, ISO 8601 instants at most 366 days apart, set it outright (until is now by default), and grain, with offsetMinutes for the reader, also gives the figures per minute, hour or day.
Inputs
daysnumber- Default
30 minutesintegerThe window in minutes, such as 60 for the last hour. It wins over days.
At least 1At most 527040sincestringWhere the window starts, as an ISO 8601 instant. It wins over days and minutes.
Formatdate-timeuntilstringWhere the window ends, as an ISO 8601 instant, not included, now by default. Only with since.
Formatdate-timegrainstringStart the window at the start of a minute, hour or day in the reader's time, as the Tracking page does.
One of"minute""hour""day"offsetMinutesintegerThe reader's offset from UTC in minutes, so a day starts at their midnight.
At least -840At most 840addressstring- 3 to 320 characters
Also available in
listTrackingHits
Every open and click of one tracked message, newest first, one page at a time, as the Tracking page lists them under a message: when, which reader it came from, the mail client, the device and the place, and for a click the link that was followed. Give it the tracking id listTrackedEmails or getEmailTracking reports, or the msg_ id the message went out as. Only the hits that count are listed: includeMachine true adds the ones that did not, such as privacy proxies, scanners and a repeat within thirty seconds, each marked Counted: no. address answers only when the message went out from that address. When more follow, the last line gives a cursor: call again with it, and the same includeMachine, for the next page.
Inputs
idstringRequired- 1 to 64 characters
includeMachineboolean- Default
false addressstring- 3 to 320 characters
limitinteger- At least 1At most 200
cursorstring- 1 to 128 characters
Also available in
- API
GET /tracking/{id}/clicksGET /tracking/{id}/opens- TypeScript
tracking.listClicks()tracking.listAllClicks()tracking.iterateClicks()tracking.listOpens()tracking.listAllOpens()tracking.iterateOpens()- Python
tracking.list_clicks()tracking.list_all_clicks()tracking.iterate_clicks()tracking.list_opens()tracking.list_all_opens()tracking.iterate_opens()- Ruby
tracking.list_clickstracking.list_all_clickstracking.iterate_clickstracking.list_openstracking.list_all_openstracking.iterate_opens- PHP
tracking->listClickstracking->listAllClickstracking->iterateClickstracking->listOpenstracking->listAllOpenstracking->iterateOpens- Go
Tracking.ListClicksTracking.ListAllClicksTracking.IterateClicksTracking.ListOpensTracking.ListAllOpensTracking.IterateOpens- Java
tracking().listClickstracking().listAllClickstracking().iterateClickstracking().listOpenstracking().listAllOpenstracking().iterateOpens- C#
Tracking.ListClicksAsyncTracking.ListAllClicksAsyncTracking.IterateClicksAsyncTracking.ListOpensAsyncTracking.ListAllOpensAsyncTracking.IterateOpensAsync