Bold BI

SendGrid Email Stats Tracking Example with Bold BI

SendGrid Email Stats Tracking Example with Bold BI

SendGrid offers a trusted email delivery service for marketing, transactional emails, and email campaign monitoring. This article will walk through the steps to connect your SendGrid account and explore, monitor and track email marketing statistics with Bold BI Dashboards, starting either from a blank dashboard or with the built-in SendGrid dashboard templates.

If you are new to Bold BI, register a site. At the end of the registration process, you will reach the following page view.

homepage view of Bold BI dashboards for the illustration of sendgrid data connection for tracking mail stats
Homepage view of Bold BI Dashboards

Getting SendGrid data

Before getting into the dashboard creation process, decide the metrics you require from the email stats and respective API endpoints. Through the SendGrid API, obtain the email stats and analyze them based on category, subuser, country, email client, mailbox provider and browser. Above all, be sure to acquire SendGrid API call returns response in JSON format.

To establish a connection with your SendGrid account, two different authentication modes are supported. Choose any one of these modes.

  • Basic HTTP Authentication
  • API Key

For Basic HTTP Authentication, just provide the username and password for your SendGrid account in the connection window.

For API Key, add an Authorization header passing API key as its value, such as Bearer {API Secret Key}.

Get the API key for your account from here. Above all, your API key should have specific permissions to access your preferred areas. For this walkthrough, the API key should have permission to access stats endpoints.

Here is a table illustrating the stats endpoints for reference.

EndpointUsed forEndpoint URL Example
GET /statsRetrieval of global email statistics between a given date range.https://api.sendgrid.com/v3/stats?start_date=2018-11-01
GET /geo/statsRetrieval of email statistics based on country and state/province.https://api.sendgrid.com/v3/geo/stats?start_date=2018-11-01
GET /devices/statsRetrieval of email statistics based on device type.https://api.sendgrid.com/v3/devices/stats?start_date=2018-11-01
GET /clients/statsRetrieval of email statistics based on client type.https://api.sendgrid.com/v3/clients/stats?start_date=2018-11-01
GET /clients/{client_type}/statsRetrieval of email statistics based on specific client type.https://api.sendgrid.com/v3/clients/phone/stats?start_date=2018-11-01
GET /mailbox_providers/statsRetrieval of email statistics based on mailbox provider.https://api.sendgrid.com/v3/mailbox_providers/stats?start_date=2018-11-01
GET /browsers/statsRetrieval of email statistics based on browser.https://api.sendgrid.com/v3/browsers/stats?start_date=2018-11-01

Finally, you have all the metrics and the respective API URL endpoints in hand. These can be used to monitor and track the email stats.  The next step is to create data sources using these API URL endpoints and design a SendGrid dashboard.

Creating dashboard using SendGrid data

From the homepage of Bold BI Dashboards, navigate to and select the New Dashboard tile.

New Dashboard tile in homepage
New Dashboard tile in homepage

As a result, the Create Dashboard window opens with four options.

templates view in create dashboard window for the illustration of sendgrid data connection for tracking mail stats
Templates view in Create Dashboard window

Click the option Start from Scratch and connect to your data.

Choose Blank Dashboard. As a result, the dashboard designer page opens with a new blank dashboard created.

blank dashboard for the illustration of sendgrid data connection for tracking mail stats
A blank dashboard

To create a new data source with SendGrid data, select the data source icon at the right. Consequently, this will expand the data source panel as shown below.

empty data source panel for the illustration of sendgrid data connection for tracking mail stats
An empty data source panel

Select CREATE NEW in the above-mentioned panel. As a result, it shows the list of data connectors.

supported data connections for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Supported Data Connections

In the Categories dropdown list at top, choose the category as Email Campaign.

supported data connections under email campaign category for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Supported Data Connections under Email Campaign category

Finally, choose the Twilio SendGrid connector. Consequently, the SendGrid data connection window will be displayed in the panel.

default view of sendgrid data source window for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Default view of SendGrid Data Source window

Configuring new data source

Name the data source BrowserEmailStats.

In the URL section, fill any of the Stats endpoint URL like, https://api.sendgrid.com/v3/browsers/stats?start_date=2018-11-01.

Leave the default value GET selected under the Method section as-is.

Clear the content under Header(s) section if you have your account username and password to enter.

Choose Authentication Type as Basic Http Authentication. Enter the correct username and password in their respective fields.

If you have API key with needed permissions, add Authorization as plain text header and its value as Bearer {API Key} as shown below. Set the Authentication Type to None.

Define the refresh settings with the interval. Based on this, the dashboard can refresh itself with latest data updates.

configuring sendgrid data source window for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Configuring SendGrid Data Source window

Click Preview & Connect. As a result, window prompts like the below screenshot will list the data results, categorized into table and columns.

table schema preview window for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Table schema preview window

Choose the desired columns and click Connect. Consequently, the data source with selected table and columns is created.

editing view of data source for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Editing view of data source

Drag and drop the table into the editing window. Perform required data modeling operations like column type conversion (for example, changing the date column from string type to date type) and column hiding (type column).

Finally, click Save to save the data source.

formatted view of data source for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Formatted view of data source

The data source has been created. You can also create data sources for other statistics with their respective endpoint URLs. Consequently, the data sources panel lists the created data sources.

data source panel with sendgrid data sources for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Data source panel with SendGrid data sources

You can start creating dashboards with the required widgets using the following links.

Creating dashboard

Adding a widget to design view

Assigning data to widget

Configuring properties to widget

Finally, the end result of all of this a dashboard like the one shown below.

Bold BI dashboard with sendgrid data for the illustration of sendgrid data connection for tracking mail stats
Bold BI Dashboard with SendGrid data

Start with data connected to a blank dashboard

You can also start creating data and then moving to a blank dashboard for designing.

In the homepage, click the data sources icon to create new data source as highlighted below.

highlighted view of supported data connections in homepage for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Highlighted view of supported data connections in homepage

As a result, the Create Data Source window opens with the supported data connections list.

highlighted view of sendgrid connector in create data source window for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Highlighted view of SendGrid connector in Create Data Source window

Choose the SendGrid connector. Consequently, the SendGrid data connection window will appear.

default view of create data source window for sendgrid connection for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Default view of Create Data Source window for SendGrid connection

As described above, fill in the details. As a result, new data source will be created and a blank dashboard will open to be designed.

Start with a built-in SendGrid dashboard template and connect to your data

To create a new dashboard with a SendGrid dashboard template, navigate to the New Dashboard tile in the homepage.

new dashboard tile in homepage for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
New Dashboard tile in homepage

Click Start from Template option to open the Dashboard Templates page.

list of dashboard templates for web services for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Dashboard Templates Listing

Search SendGrid in the Data Sources listing at left. Consequently, the SendGrid dashboard templates will be displayed at right.

sendgrid dashboard templates for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
SendGrid Dashboard Templates

Choose the preferred template from the listing.

Furthermore, to preview the dashboard template, click Load with sample data.

sendgrid dashboard template with notification banner showing progress for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
SendGrid Dashboard template with notification banner showing progress

As a result, the SendGrid dashboard with sample data loads.

sendgrid dashboard with sample data for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
SendGrid dashboard with sample data

To visualize your own data, click Connect Your Data at top of the dashboard. As a result, the authorization window prompts you to provide your SendGrid account details. Most importantly, this is needed to authorize the connection to your SendGrid account from dashboard.

authorization page for sendgrid connection for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
Authorization page for SendGrid connection

Enter the requested details and click Continue.

sendgrid dashboard preparation progress with own data after authorization for the illustration of sendgrid data connection for tracking mail stats in Bold BI dashboards
SendGrid dashboard preparation progress with own data after authorization

As a result, the SendGrid dashboard renders in the same page with your data.

Sharing dashboard

To share this dashboard with others, enable access permission to it for concerned users. You can copy the URL from address bar and share. Refer here for more detail on sharing dashboard. Also, look at this blog article to get a quick and complete overview of features available in Bold BI Dashboards.

Therefore, we hope this blog article helps you connect your SendGrid data with Bold BI Dashboards. You can monitor and track the email stats with ease. For any questions or clarifications, please post us through the comments section available below. You can also contact us by submitting your queries here or if you already have an account, please login to submit your support query. Our recent blog post on connecting Jira data with Bold BI Dashboards is available online. Bold BI Dashboards now comes with a 15-day free trial with no credit card information required. Give it a try on your own and let us know what you think! We are happy to assist you. Design with smile!

Start your free 15-day trial today

Leave a Reply