File Submitter: vampke
File Submitted: 08 Nov 2012
File Category: Miscellaneous
I have created a simple snippet that allows to track hyperlink clicks.
This can be used onsite or in newsletters. There is a database field for subscribers that I use on my site but is not used in the snippet as posted here.
To use it you will need to create
- a database table *etomiteprefix*clicktrack
- a snippet "trackclicks" snippet
- a "showtrackclicks" snippet
- an empty template containing only [*content*]
eg: in stead of using
<a href="http://www.google.com">google</a>you can use
<a href="trackclick?cmp=googlecampaign&url=http://www.google.com">google</a>Every time a user clicks the above url the cmp and url will be stored together with the user IP in the db.
Use the snippet in a page with 'empty' template that contains ONLY [*content*] page needs to have cacheable set to OFF!
(in the example above the pages alias is trackclick and the site uses frienddly aliases
Hope it is useful for someone!
Click here to download this file











