URL Traking

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
waqas_punjabian
Forum Commoner
Posts: 67
Joined: Wed Aug 10, 2005 9:53 am

URL Traking

Post by waqas_punjabian »

Hi all,

I need to develop a mechanism in my website that should track user navigation in my website.
That tracking will help me in several ways. For example,

1) A user signs in and visit different pages. Now, he goes inactive for 30 minutes and signs out automatically. If he signs in again, he should navigate to that page where he was previously.

2) A product page can be visited through following routes:

a) Home >> New Products >> ABC-Product
b) Home >> Featured Products >> ABC-Product
a) Category >> Sub-Category >> ABC-Product

Now, on ABC-Product page, the Bread Crumb (Navigation) links should be managed accordingly.

Can you please give me some idea, how can I track user where he is navigating?

Thanks in advance,
Waqas
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: URL Traking

Post by Christopher »

For #1 you probably want to save the location in a cookie or in the database associated with the user's record. For #2 you probably want to save the "breadcrumbs" in the session as a simple stack that you can use to display those links.
(#10850)
waqas_punjabian
Forum Commoner
Posts: 67
Joined: Wed Aug 10, 2005 9:53 am

Re: URL Traking

Post by waqas_punjabian »

Thanks arborint. :D :D :D
Post Reply