Forum Moderators: open
userID
landing page
referring page
So it looks something like:
user ¦ Landing Page ¦ Referrer
------------------------------
1 ¦ a.html ¦ empty
1 ¦ b.html ¦ a.html
1 ¦ c.html ¦ b.html
2 ¦ a.html ¦ empty
2 ¦ b.html ¦ a.html
2 ¦ c.html ¦ b.html
I'm not looking to get every single user, just some general stats. Like 40% of people that landed on pags A went to Page B, 20% of the visitors left the site on page D etc...
thanks
Like 40% of people that landed on pags A went to Page B
SELECT L.user_id FROM log L WHERE L.landing_page='a.html' AND L.referrer IS NULL AND EXISTS (SELECT * FROM log L2 WHERE L2.user_id=L.user_id AND L2.landing_page='b.html')
This should give you a list of users landing on a, then going to b - you will then need to calculate what % of the total this is.
[edited by: FalseDawn at 5:49 pm (utc) on Nov. 22, 2006]
Then you will have the base data but need to build a better model for those queries and then load your data into it for analysis, I use something like .
tblSession(SessionID, ExternalRefererID,RefererQuery)
tblPageView(SessionID,DateTime,PageID)
tblPage(PageID,Url,PageName,PageTypeID)
tblPageType(PageTypeID,PageTypeName)
tblExternalReferer(RefererID,RefererName)
Just use internal refers for path building when loading the data, no need to keep them if your happy with you path building code.