How to get the most information from a tracking pixel, google analytics, and emails - email

So I am trying to track more information from our order confirmation emails or shipping confirmation emails. I have read online that tracking pixels can track IP addresses, devices, locations, and so on. I have added something like the following code to our emails to track email opens:
<img src="https://www.google-analytics.com/collect?v=1&tid=UA-XXXXXXXX-X&t=event&cid=test&cn=test&cs=email&ec=pixel&ea=open&el=my_email" width=1 height=1 style="display:block;">
Is there a way to get any more data using this method? Or do I have to use some other service in combination with the code in the emails?

Is there a way to get any more data using this method?
Sure, manually crafting GA requests is called measurement protocol in Google Analytics jargon. You can add/override a wide list of fields, here's the complete list from the documentation for référence:
https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
And an article, also from official Google docs, related to email tracking with measurement prorocol (event though it is quite short):
https://developers.google.com/analytics/devguides/collection/protocol/v1/email
Bé careful for the value used with the cid parameter, as it is used to.discriminate between clients. Using the same value everywhere will count every open as coming from the same user. But I believe the value "test" provided here is just for the sake of the example.
Please also be careful not to send any PII data to GA (name, postal adress, ...)

Related

A/B Testing Emails - Adding another utm- variable

I run a script on a local computer which sends out "review request emails" to customers who bought an item from a particular website. I have the website linked up to analytics so I can see how effective the emails are, and I make each link on the email with the correct google-analytics utm_ variables, like so:
www.website.com?utm_source=mailjet&utm_medium=email&utm_campaign=review_request
So I was trying to figure out if there's an additional variable I could add to the URL to distinguish between two different types of Review Request emails I send, to see which is more effective.
I've read that using utm_content might be the variable I'm looking for, but I'm not sure I'd be using it correctly or that's the right choice.
utm_content would work fine for you. just add this alongside the other utm parameters and set the distinctive value for each variation, e.g.:
www.website.com?utm_source=mailjet&utm_medium=email&utm_campaign=review_request&utm_content=red_variant
Then the Ad Content dimension in your GA reports will reflect the actual values of utm_content and you'll be able to use is as a primary or secondary dimension

Does SendGrid support double opt-in as a feature?

Does SendGrid support double opt-in to Lists as a feature or is that something we will have to implement for ourselves?
https://sendgrid.api-docs.io/v3.0/contacts-api-recipients/add-recipients
It doesn't appear to me to be anywhere in the docs, but I thought I'd ask in case I missed it.
Not as of the current date; I asked their support staff and received the following answer:
Double opt-in needs to be implemented by you in the form/page you're subscribing your recipients. The confirmation email can be sent through SendGrid.
For Marketing Campaigns we have the SendGrid’s WordPress Subscription Widget that makes it easy for people visiting your WordPress site to subscribe to your marketing emails;
or Building a SendGrid Subscription Widget.
I got this answer from their support. It turns out we have to implement it by ourselves.
The double opt-in functionality is not something SendGrid provides as
we expect our customers to handle any opt-in practices on their side.
We apologize for any inconvenience.
SendGrid will be GDPR compliant by May, 25, 2018. Please note that
SendGrid does not – and does not currently have plans to – use servers
or data centers in the European Union to process email. Thus, SendGrid
cannot restrict data to the EU. However, neither current EU law nor
the GDPR require this. Instead, what is required is that SendGrid must
provide "appropriate safeguards" for data that it hosts and processes
on its US servers (see Art 46 of the GDPR here). SendGrid offers a
Data Processing Addendum (DPA) to provide such adequate safeguards,
which includes provisions for when GDPR goes into effect.
More info on GDPR can be found here. Our DPA can be reviewed and
signed by filling out the information here.
They do not support it. I asked support many times, which is a strange as it would seem a company of that size could spare the dev resources to build a feature that literally all of their customers need.
However, https://sgwidget.com is a third party product that provides double opt in functionality for Sendgrid accounts.
Full Disclosure: I am a developer at SG Widget.
No, indeed still today, they do not. Not in their forms, nor in their API is there simple, flip-switchable support for double opt-in. But, with email automation fairly recently implemented in their marketing services ("free" and "advanced" plans, not "essential") you can send an automated email directly upon sign-up.
My solution is to have 2 lists for new contacts, where one is a "pre-confirmation" list and the other being the "real" list. Here´s a way to use automation:
Create initial signup form, either via their sparse Web forms or via your own, using HTML/JS/PHP and API endpoint:
Create 2 separate lists, one for "pre-confirmation" emails and the other for people who confirm their addresses.
Make the form sign up new contacts to the first list, "pre-confirmation".
Create a marketing automation flow that triggers upon new signups to the "pre-confirmation" list. Make the automation trigger an email that contains a button or a link with the following link structure:
https://yoursite.com?email=user#email.com&passphrase=[phrase-you-set-manually]
where ?email= is your user´s email, substitute this in the email template/design by {{ Sender_Email }}
where &passphrase= is a phrase long enough to not be guessed. Since you only have one single email design here, and you can only enter one single phrase, unless you make a script or a hash, you make it difficult enough for people to think it was generated by a server :).
On your server/application, yoursite.com, use $_POST['email'] and $_POST['passphrase'], or whatever you name them, to validate the email clicks from your list and then enter all validated emails to the correct list using the PUT
/marketing/contacts endpoint.
you may also have to delete the user from the previous list, using DELETE
/marketing/lists/{id}/contacts, but I do think that the PUT /marketing/contacts takes care of placing the contact in only the lists specified in the list_ids field.
once the contact has been entered into the correct list, you can also have a marketing automation set up for that list, which sends him/her a welcome message.
This method takes care of double opt-in for SendGrid without using one single email credit from the Email API (transactional plan). The only catch is that we utilize one initial and one second/final list to achieve it.
Note: the initial sign-up message that here acts as the "confirm your email" message, will be tied to the first list and will require a marketing unsubscribe link in the footer. Make it clear in the bottom of the email that it is a temporary list, to not get any spam complaints. But it will not be an issue, as we wont be sending to anyone in that list except for this initial time. Unless you have a user who enters his/her email twice, after some time of inactivity when they forgot they already signed up. That could happen. But it´s a separate issue.
I think this is possible by switching the flow of a typical email subscriber. When the user clicks your subscribe button, instead of calling the sendgrid members/contact PUT api to add to your list, send an email with a link to a URL of yours that will then trigger the members/contact PUT api call.
Not sure what stack you are using but I was able to build something like this with next.js utilizing their api routes

Unique "reference" for form response?

I just created a Google form for online enquiries for my business. I set it up so that it sends an email to the person who submits the form using the "FormEmailer" script but my question is, is there a way I can give that person or more specifically that FormEmailer generated email a unique "Reference" number at the time of submission?
Thanks in advance.
Dan
Absolutely, if you are willing to do some coding on your own.
You may want to look at the recently launched Form Notification add-on for Google Forms, which also sends emails to people who respond to a form. This add-on is meant to be a code sample, and you can find the source code on GitHub, and a quickstart about it in the Apps Script documentation.
To do what you are asking, you would just need to copy the code and add another "Reference number" field to the RespondentNotification template, and then modify the sendRespondentNotification() function accordingly. Alternatively, you can just insert the reference number into the email subject in that function.
Note that this add-on has some limitations: the number of emails sent out (like all of Apps Script) are subject to quota limits. In addition, the add-on isn't really meant used for forms with multiple collaborators/editors. However, Form Notifications should give you a good idea of how to write scripts that respond well to form submissions.

Keeping track of whether an email has been opened

I'm using rails 2 for this app, with ActionMailer, but this is a general question about emails.
When we send out emails, i save a record corresponding to the email in a database table. I'd like to keep track of whether people have read the emails, and am wondering the best way to do it. On initial googling, it seems like i've stumbled into an ongoing battle between spammers and email clients!
My first thought was to use the "read receipt" header, but i know that this isn't supported by a lot of clients and is therefore unreliable. After that, i read of the tactic of including an image in the mail, and of detecting that image being loaded. I was thinking that i could put a parameter with the email record's id in the image url, so that when i get a request for that image i can see if it has a (for example) email_id param and if so, mark the corresponding email as having been read.
But, then i remembered that many clients are wise to this tactic and specifically ask the viewer of the mail if they want to display images. Obviously they might say no.
Am i right in thinking that i can't pull in other resources, such as stylesheets, in my mail? Because if i can pull them in, i could do that same trick but with the stylesheet rather than an image.
Grateful for any advice, max
Externally-hosted stylesheets are generally treated the same way as images. The client will not download them without prompting the user, if that works at all with HTML-formatted emails.
One thing to consider- you're looking to determine whether the email was read, not necessarily just received, right? Format your email so that it can't be easily read without viewing the images, and include a "view in browser" link at the top. Track image and page-format views and I think you'll have a fairly reliable way to measure actual reads.
Bit late on this, but we've got a similar problem.
We're tracking the links to our site that are included within the email. We're doing this by, like you, having a DB record per email sent out. We've generated a unique hash key per email and are including that as a parameter on all the links included in the email.
We simply then have a before_filter that looks for the parameter and records the fact against the correct email record by using the unique hash to identify the correct one.
We use a unique hash key (rather than the DB's primary key) just so it is a little bit more secure / reliable.
Obviously this method only helps us track the clicks our emails have generated (and not if they've been read) but it is still useful as we can see which of ours users has clicked on which links.
We are having major problems with this as well.
We have task wek portal, where users create tasks (like paint my house) and then we invite painters to give the task creator an price on painting his house.
For that we had a very advanced email system, that sends an invitation and if they accept the invitation we send them the contact info of the task creator.
We need to be able to track if the email was opened, and then once it's opened, we know that the company got the contact info, and we can now send another email to the task creator, telling them that they can expect to be contacted by that company.
The problem is that tracking if the email was opened is not reliable at all. There are different systems for this like msgtag (which does not support a wide range of mail clients like yahoo and other major clients) and our email API client (elastic email) even offer some API call back functions to tell us if each email was opened or bounced or whatever. But again, it's not reliable. To track if it's open, elastic email just includes a 1x1 px image and track if it's opened. So if people don't click "show images in this email" it's not tracked as opened.
So basically we are down to two options.
Have vital portions of the content printed on images, that they have to view to get the info we want to track if they got (in this case contact info)
Just have a link in the email "click here to get the contact info" and then track if that is clicked.
So in conclusion, the "track if opened" is totally useless and unreliable, unless you can fully control which email clients your recipients are using and how they are using them (like if they are all your employees or something).

In salesforce, can you verify that an email sent by a workflow was opened by the recipient?

I am using a salesforce workflow to send out product information and invoices to clients but I am running into problems thinking of how to verify if a client receives the email and or opens it. Is there any way to prove that a client received my inventory list or invoice? Doing some prior research on this subject I have come across the following suggestions:
Adding a 1x1 invisible image to the email with a unique id
Adding a regular image instead of a 1x1, maybe company logo
Having the recipient click a link to see the invoice
With all these solutions, you have to detect image requests or link request for them and extract/produce a unique id for each client. I am not really sure how to do this in salesforce so any help would be appreciated, along with other detection ideas.
If you have Salesforce Content, there are some ways to expose documents to clients with the features you need. Basically you'll send an email with link and later you can track confirmation of opening, count how many times was it downloaded.. You can also set the expiration date to the document (can't be downloaded anymore after the date).
As for "pure" email from Apex/Visualforce and basically manually recreating the Content's functionality... nowadays most mail clients block external pictures unless explicitly allowed by the mail recipient, so I suspect you'll have poor track of emails marked as opened. Probably you could create a small Visualforce page (no header, no styles, just controller that makes update "invoice viewed" in the database). Display image from Documents on this page (make sure it's "externally available image") or even just display 1 pixel encoded in base64...