Forum Moderators: coopster
I need to log when one of my site visitors clicks on a link on one of my pages to go to one of the merchants I recommend, to enable me to see which pages are converting best etc. I currently use "statcounter.com" for my stats and need to include one of their javascripts in each of the pages visited to log visitor activity.
I had thought of using exit.php for the php script but in this there is no page (am I right?) in which to include the statcounter script.
I have a low technical knowledge so would appreciate some help.
You could set up an exit page through which all outbound links go, grab the link target from the incoming URL and then reset the browser location to that new address. Then when you look at your stats page, you would see how many times that exit page had been requested...?
If you want details, you may need to set up a little database to collect info from those hits, like where the outbound link was going to and stuff like that.
Sorry, but you're getting out of the novice stuff and into more customized, programmable solutions. How much of a newbie are you? Do you have your own server, or is this a $5 hosted solution? There are lots of factors which will expand or limit what you have available to you.
If you simply want to record people clicking on outgoing links, the easiest way I can think of is to setup a db with all the links and at least a counter. Then have all the links in a format like link.php?link=#, and when that php script is called increment the counter and then send them to the corresponding page.