1. Feature Overview
You can track opens events of emails sent using LeadSquared Email in Google Analytics.
2. Procedure
You can do this by specifying a GET request in an HTML image tag in the Email body. This request sends the Email data to Google Analytics when the Email tries to fetch the image from the HTML tag. This can be achieved by following the below steps –
2.1 Create a New Custom Metric
Create a new custom metric in the Google Analytics admin interface for your Web Property. To do this:
- Log on to Google Analytics using your credentials and click Admin in the top-left corner.
2. Select the corresponding Account and Web Property, and click Custom Definitions>Custom Metrics under the Property column.
3. Click NEW CUSTOM METRIC. The Add Custom Metric pop-up box appears.
4. Enter the required details as shown in the image above and click Create.
2.2 Creating an Email Campaign
- From the default LeadSquared Dashboard, go to Marketing>Email Campaign and click Create Email Campaign.
- The Create Email Campaign wizard appears. For more information, refer to How to Create and Schedule Email Campaigns?
3. Select a relevant template and proceed to Compose Message.
4. Drag-drop an HTML block to the email body, and click the block to edit the HTML content through Content Properties on the right side.
5. Enter the following content in the Content Properties box:
<img src=”http://www.google-analytics.com/collect?v=1&tid=UA-XXXXXXX-YY&cid=*|UNIQID|*&t=event&ec=email&ea=open&el=*|UNIQID|*&cs=newsletter&cm=email&cn=062413&cm1=1″ />
The parameters in the HTML block is explained in the table below:
Parameter Name | Parameter Value | Description |
v | 1 | Protocol Version (required) |
tid | UA-XXXXXX-YY | Tracking ID / Web Property ID (required) |
cid | *|UNIQID|* | Client ID (required). This anonymously identifies a particular user, device, or browser. The value – *|UNIQID|*- is a dynamic parameter (merge tag). |
t | event | Hit type (required). The tracking is done with event tracking. |
ec | Event Category | |
ea | open | Event Action |
el | *|UNIQID|* | Event Label |
cs | newsletter | Campaign Source |
cm | Campaign Medium | |
cn | 062413 | Campaign Name |
cm1 | 1 | Custom Metric 1 |
Note – The HTML block with the above image tag is hidden from the email recipient.
6. Complete the remaining steps of the Email Campaign Wizard.
When an email is opened, the Email Open is recorded as a Metric in the Event Tracking Reports of Google Analytics.
Any Questions?
Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!