Mobile app version of vmapp.org
Login or Join
Lee4591628

: Use a GET variable to see a referrer in Google Analytics 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

@Lee4591628

Posted in: #Drupal #GoogleAnalytics #Php #Url

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:
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:
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!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Lee4591628

1 Comments

Sorted by latest first Latest Oldest Best

 

@Berryessa370

I think I've found the answer you are looking for on Google's support page for Analytics.
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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme