1

I have a system on my site that sends an email to a customer with a certain url in it (not a private url, just the info they've requested). The format of this url is just straight on:

http://www.mysite.com/the/requested/data

When the user clicks on this url, Google Analytics sees this as 'Direct' traffic. However, I also have a lot of 'real' direct traffic, users that just type the url, or use bookmarks, and I need to distinguish these 'mailed' users from the rest.

I was thinking about this:

http://www.mysite.com/the/requested/data?ref=mail

and then in the frontend (a Drupal 7 site), capture this GET variable ref, and if it is set to mail, then call the Javascript to trigger a Google Analytics Event.

Is this the only way to go about? Or are there other/better ways? Thanks for the input!

2

I think I've found the answer you are looking for on Google's support page for Analytics.

https://support.google.com/analytics/answer/1033173?hl=en

Click on the bottom link that reads Custom Campaigns and I bet that you will find what you are looking for.

  • Thanks, looks very good indeed! Do you have any experience with this? Will Google Analytics indeed automatically pick up these variables? – Borniet Feb 4 '14 at 12:50
  • From what I've read up on there shouldn't be much issues with migrating. And yes Analytics should pick up these variables. I suggest posting on the mailing list for Analytics. Or try IRC. – Linus Juhlin Feb 4 '14 at 13:19

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.