0

I send newsletters from my Drupal 7 site, using the Simplenews module. I'm using this tracking code, but it isn't tracking uniqueness:

<img src="http://www.google-analytics.com/collect?v=1&amp;tid=test-&#10;&#10;1&amp;cid=123445678&amp;t=event&amp;ec=email&amp;ea=open_my_newsletter_june2016&amp;el=recipient_id&amp;cs=newsletter&amp;cm=email&amp;cn=Campaign_Name">

I change the tid according to my Google Analytics account and the ea attribute to the name of my newsletter and the date, but these aren't unique URL's for users.

How can I track unique opens of my newsletter, using Google Analytics?

1

As you mentioned, you need a unique values for GA tracking pixel. You need to utilize Simplenews's integration with the Token module so you can insert unique values into the URL for each newsletter copy that goes out.

For example, the inserting the token [simplenews-subscriber:user:uid] will let embed the unique user id into each tracking pixel copy.

The tokens will vary depending on the details you need to track, but Token integration should provide almost every detail you need.

  • So, if I understand your answer right, I need to add [simplenews-subscriber:user:uid] as the cid attribute. I already have the token module, so in theory I am ready? – Argiris A Jun 7 '16 at 7:21
  • If cid (customer id?) is supposed to represent a unique attribute id then yes. Also note that token won't be defined if you allow any email address w/o user accounts to sign up; you may need to use some other unique value in that case. – Shawn Conn Jun 7 '16 at 7:33
  • Ok, thanks a lot for your answer! I finally understood what I may have to do and I am ready to start testing! – Argiris A Jun 7 '16 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.