How to Track Gmail Messages with Google Analytics

Published in: Gmail - Google Analytics

Google Analytics is often used for tracking visits to web pages and mobile apps but the same analytics service can also be used for tracking your outgoing email messages in Gmail. You can add the Google Analytics tracking code to your Gmail messages and you’ll instantly know if your email message has been seen or opened by the recipient.

This is like getting a read receipt for your email messages but, instead of cluttering your inbox with read receipts, the email open activity is automatically logged as an event in your Google Analytics.

Know When People Open Your Email with Google Analytics

The idea is simple. We insert the Analytics tracking image to our outgoing email message. When the recipient opens the message, the image file will download on their computer and the “visit” will be logged (video demo) in your Analytics. And since Google Analytics supports real-time reporting, you’ll see instant activity in the Analytics dashboard when an email is opened or read.

Here’s how you can add the Analytics tracking code to your Gmail messages:

  1. Go to your Gmail and compose a new email message. Specify the recipients, subject and the body. You can also include attachments and inline images in your message. Once the draft message is ready, let it stay in your Drafts folder and do not hit the Send button.
  2. Open the email tracker web app and authorize it. This is required for the web app to send your Gmail drafts with the Google Analytics code included.
  3. Select your Google Analytics account ID from the drop-down, next choose the Gmail draft from the drop-down and hit the Send Email button. Your mail will now get delivered to the recipient(s).

When the recipient opens your email message, the event will be logged in your Google Analytics.

Track Gmail Opens in Google Analytics

Here’s how you can track the email open activity in your Analytics report.

Open Google Analytics and choose Events under the Standard Reports group. There you should see new events with the category Email Open as people open your Gmail messages. You can click the category to see the email address of the recipients who have seen your email and also the subject line of the message that they have just read.

Open Gmail Tracking Know when people open your Gmail messages with Analytics (video)

PS:The Google Analytics profile ID looks something like UA-xxxx-yy and you can easily find this ID in your Analytics Dashboard (Admin -> Property Settings -> Tracking ID). It will be a good idea if you create a separate web property in Google Analytics for tracking Gmail messages.

Internally, when you send an email through the Google Sheet, it inserts the tracking image to your Gmail message with the help of a Google Script. This tracking image is a 1x1 pixel transparent gif that will not be visible in the message body.

Email tracking is also included in Mail Merge. URL shorteners, like, can also help you know if your message has been read.

The tracking method will obviously not work if the recipient has disabled image downloading but now that Gmail auto-downloads images after caching, email open events are more likely to get tracked.

📮  Subscribe to our Email Newsletter for Google tips and tutorials!
Published in: Gmail - Google Analytics

Looking for something? Find here!

Meet the Author

Web Geek, Google Developer Expert
Amit Agarwal

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India. He is the developer of Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Get in touch

Google Add-ons

Do more with your Gmail and GSuite account

We build bespoke solutions that use the capabilities and the features of Google Workspace for automating business processes and driving work productivity.

  1. Mail Merge with Attachments
    Send personalized email to your Google Contact with a Google Sheet and Gmail
  2. Save Emails and Attachments
    Download email messages and file attachments from Gmail to your Google Drive
  3. Google Forms Email Notifications
    Send email notifications to multiple people when a new Google Form is submitted
  4. Document Studio
    Create beautiful pixel perfect documents merging data from Google Sheets and Google Forms
  5. Creator Studio for Google Slides
    Turn your Google Slides presentations into animated GIFs and videos for uploading to YouTube