Answer the question
In order to leave comments, you need to log in
How to get information about the user who viewed the letter?
Hello.
With help
https://developers.google.com/analytics/devguides/collection/protocol/v1/email
http://www.google-analytics.com/collect?v=1&tid=UA-XXXXXX&t=event&cid=*|UNIQID|*&cn=hellridecase&cs=email&ec=blogemail&ea=open
Answer the question
In order to leave comments, you need to log in
First you need to create a tracking pixel.
And add parameters to the link so that the link looks something like this:
where:
tid = Google Analytics tracking id (looks like UA-XXXX)
cid = session id (Unique session id (recipient id))
t = Tracking type (event);
ec = event category;
ea = event action;
el = event label (optional);
cn = campaign name (optional);
cs = campaign source (required if you're tracking a campaign).
Depending on how familiar you are with GA , you may already have an established system for using variables, so the way we suggest is just one of several possible ways.
We assign the tracking ID to the tid variable, and for "t" we write "event" (event) so that GA understands that you are tracking an event, not a page view.
The event category (ec) can be used to group your events. We used the name "blogemail"
The Event Action (ea) you can use to specify the type of event you're tracking, such as interaction, open, email client, animation, and so on.
The event tag (el) is optional. You can use it to indicate the type of interaction (rollover, click) or a detail, such as a block in an email, that the user interacted with. You can also use the event label to pass the type of mail client (webkit, mobile, browser gmail)
You can use the campaign name (cn) and campaign source (cs) to track email campaign reports. Campaign source is required if you want to track by campaign name, and you can use any value. I leave just "email"
Unique session ID (cid) is an identifier assigned to a specific session of a specific user. Normally you could use the user's email, but Google doesn't allow that. According to the documentation, information submitted to GA must not contain personal data.
To meet these requirements, you can contact your email provider and get unique identifiers for each user. At MailChimpthere is a merge tag for this that creates user IDs:
Now that you have a tracking pixel URL, you can use it in your campaigns. Here Tracking Interactions in Interactive Email you can read about the basics of this.
Here are some examples implemented using the code in the article (don't forget to replace the tracking id with )
Open Tracking Let's start with a simple open tracker that will record an event every time someone opens an email (assuming images are displayed)
<img src="http://www.google-analytics.com/collect?v=1&
tid=UA-XXXXXX&t=event&cid=*|UNIQID|*&cn=hellridecase&
cs=email&ec=blogemail&ea=open" width=1 height=1>
.img-swap:hover .tpixel{
background-image:url(http://www.google-analytics.com/collect?v=1&
tid=UA-XXXXXX&t=event&cid=*|UNIQID|*&cn=hellridecase&
cs=email&ec=blogemail&ea=interact&el=rollover);
}
.radio2:checked ~ .carousel .tpixel{
background-image:url(http://www.google-analytics.com/collect?v=1&
tid=UA-XXXXXX&t=event&cid=*|UNIQID|*&cn=hellridecase&
cs=email&ec=blogemail&ea=interact&el=radio2_select);
}
.radio3:checked + .carousel .tpixel{
background-image:url(http://www.google-analytics.com/collect?v=1&
tid=UA-XXXXXX&t=event&cid=*|UNIQID|*&cn=hellridecase&
cs=email&ec=blogemail&ea=interact&el=radio3_select);
}
<style>
@media screen and (max-device-width: 600px) {
.mobile-pixel{
background-image: url(http://www.google-analytics.com/collect?
v=1&tid=UA-XXXXXX&t=event&cid=*|UNIQID|*
&cn=hellridecase&cs=email&ec=blogemail
&ea=client-type&el=mobile);
}
}
</style>
<div class="mobile-pixel"></div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question