Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks, looks very good indeed! Do you have any experience with this? Will Google Analytics indeed automatically pick up these variables? –  Borniet Feb 4 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. –  P1raten Feb 4 at 13:19
    
Thank you very much! –  Borniet Feb 4 at 13:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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