HubSpot tracking on emails sent with Google ScriptsSOLVE
Jun 4, 2018 3:39 PM
I was excited at the idea of automating emails with Google Scripts (such as this simple example: https://gsuite-developers.googleblog.com/2011/10/4-ways-to-do-mail-merge-using-google.html) and taking advantage of the Gmail/HubSpot integration.
However, it would seem that the emails sent from the example script in the above blog post are NOT tracked by HubSpot despite the fact that my default settings are track and log all emails.
Is this to be expected? Is there a way of specifying that HubSpot should track the email in my script? Does anyone have experience with sending tracked emails using Google Scripts?
Solved! Go to Solution.
Jun 12, 2018 6:24 AM
HubSpot Sales is able to track email opens by embedding a one pixel invisible image into the message once it is sent. Links are tracked by appending tracking to the end of any hyperlink that is present within your email.
When your recipient views the email and the images load, we send you a notification that the email has been opened. You can see this information in your HubSpot activity stream as well.
Please note: an open notification will fire anytime the tracking image loads, even if the email was simply in a preview pane in Outlook but was never actually opened.
HubSpot Sales tracking can sometimes be deactivated if the recipient's email client doesn't allow the tracking pixel to load. For instance, if the recipient formats their email in plain text, if their email client doesn't automatically download images, or if their corporate filter strips away all images for incoming emails. This shouldn't happen often, but can happen from time to time.
As for spam filters in relation to the tracking image or tracking appendage for links, the only time HubSpot Sales would cause your mail to go to the spam folder is if the recipient has a very strict spam filter where they do not allow images or link tracking to be present in emails. However, both of these tools are quite common in the industry, and the majority of email clients will not view your email any differently than before.
Jun 12, 2018 12:13 PM
I did glean this from inspecting the HTML of the successfully tracked messages sent in the usual way from the Gmail UI and comparing those to the messages sent from the script that were not tracked
I went a few rounds with this problem and I could not get the calls to the gmail API powering Google Scripts to embed the HubSpot tracking code, even when I sent messages with an HTML body. Learning more about how HubSpot tracking works, that does make sense; perhaps the call to append the tracking code to the email is weaved into the Gmail UI or something along those lines.
Google scripting is pretty cool, but the takeaway is that we should take advantage of the HubSpot email campaign tools for our particular purposes. In this case, I was looking for a quick proof of concept to show the powers that be the value of having tracking code on each email in a blast.