I'm designing a php website which is only accessible to members. Once member logs in, there are two hyperlinks on a particular web page. I would to track how many times the hyperlinks are clicked by which member. Could someone advise me how to achieve this?
I did some research online, they are all about counting hyperlink clicks on the whole website, no matter who made the clicks. What I really want is to track the numbers by different members.
I'm really stuck here and your help is greatly appreciated!
track hyperlink clicks on php website
Moderator: General Moderators
-
potato_chip
- Forum Newbie
- Posts: 20
- Joined: Mon Oct 06, 2008 10:38 am
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: track hyperlink clicks on php website
If they are logged in then you know their user.id.
Have a table like...
id | user_id | link_id | created_on
Then on each link put an id, which if you want to contain more details have a link lookup table...
id | title | description | created_on
At the top of every page grab the link_id in the URL and record the user and link
Have a table like...
id | user_id | link_id | created_on
Then on each link put an id, which if you want to contain more details have a link lookup table...
id | title | description | created_on
At the top of every page grab the link_id in the URL and record the user and link