Sistema em asp que gera um relatório com estatística de acessos em todas as suas páginas asp onde estiver o arquivo count.asp na forma “include file”.
Muito rico em detalhes e está pronto para o uso bastanto o usuário incluir onde quer que ele gere o relatório.
Roda com um banco de dados access
Insira o comando onde você vai que rer que o script rode. <% sToday = month(date) & "/" & day(date) & "/" & year(date) 'Fixed by Don dtYesterday = DateAdd("d", -1, now) sYesterday = month(dtYesterday) & "/" & day(dtYesterday) & "/" & year(dtYesterday) OpenDB sConnStats 'Total PageViews sSQL = "SELECT COUNT(StatID) AS Total FROM Stats" rs.Open sSQL,,,adCmdTable lPageViewsTotal = rs("Total") rs.close sSQL = "SELECT COUNT(StatID) AS Total FROM Stats WHERE Date = #" & sToday & "#" rs.Open sSQL,,,adCmdTable lPageViewsToday = rs("Total") rs.close sSQL = "SELECT COUNT(StatID) AS Total FROM Stats WHERE Date = #" & sYesterday & "#" rs.Open sSQL,,,adCmdTable lPageViewsYesterday = rs("Total") rs.close sSQL = "SELECT IP FROM Stats GROUP BY IP" rs.Open sSQL,,,adCmdTable lVisitorsTotal = rs.recordcount rs.close sSQL = "SELECT IP FROM Stats WHERE Date = #" & sToday & "# GROUP BY IP" rs.Open sSQL,,,adCmdTable lVisitorsToday = rs.recordcount rs.close sSQL = "SELECT IP FROM Stats WHERE Date = #" & sYesterday & "# GROUP BY IP" rs.Open sSQL,,,adCmdTable lVisitorsYesterday = rs.recordcount rs.close sSQL = "SELECT TOP 1 * FROM TopPageViewsPerDay" rs.Open sSQL,,,adCmdTable If Not Rs.eof Then rs.MoveFirst lTopViews = rs( "Total" ) sTopViewsDay = rs("Date") End If rs.close sSQL = "SELECT TOP 1 * FROM TopIpsPerDay" rs.Open sSQL,,,adCmdTable If Not Rs.Eof Then rs.MoveFirst lTopVisitors = rs( "Total" ) sTopVisitorsDay = rs("Date") End If rs.close sPageViewsToday = formatnumber(lPageViewsToday, 0) sPageViewsYesterday = formatnumber(lPageViewsYesterday, 0) sPageViewsTotal = formatnumber(lPageViewsTotal, 0) sVisitorsToday = formatnumber(lVisitorsToday, 0) sVisitorsYesterday = formatnumber(lVisitorsYesterday, 0) sVisitorsTotal = formatnumber(lVisitorsTotal, 0) sTopViews = formatnumber( lTopViews, 0 ) sTopVisitors = formatnumber( lTopVisitors, 0 ) %>Sumário
Páginas visualizadas | Visitantes | |
Hoje | <%=sPageViewsToday%> | <%=sVisitorsToday%> |
Ontem | <%=sPageViewsYesterday%> | <%=sVisitorsYesterday%> |
Tudo do dia | <%=sTopViews%> em (<%=sTopViewsDay%>) | <%=sTopVisitors%> em (<%=sTopVisitorsDay%>) |
Total | <%=sPageViewsTotal%> | <%=sVisitorsTotal%> |