HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 37. CH34 GETTING FEEDBACK 298


process whereby a human views each comment and either accepts it or not.


37.3 Logfile Analysis


The Apache webserver, and presumably most other webservers, keeps log-
files. These logs tell the IP address of the visitor, and the time of the visit,
and the page visited.


They may also identify the source of the page request. Did the user click on
a link, and their request has a “referrer”? That would be worth knowing.


By looking at the requests from the same IP address, you can start to form
a picture of their journey through your website. Where did they come from?
Where did they go first, second, and third? How much time passed between
each page retrieval? Where were they when they lost interest and quit asking
for more?


37.4 External Analytics


The next step up from logfile analysis is Analytics.


Analytics works from your webserver’s log files, or from something equiva-
lent. It does a more thorough job of analysis.


And it can be out-sourced. Add a bit of JavaScript to your page and someone
can provide analytics to you.


You want to know how many people have visited. How popular are you?
And where are your visitors coming from? And what path do your visitors
follow through your website? How much time did they spend on each page?
What was the last page they looked at before they walked away from your
website?


These are the kinds of questions that are answered by analytics.


Google provides free analytics. Do a Google search on “analytics” and you
will find them. Sign up for a free account. Then insert a few lines of code
right before the end tag for your head section. Every pageload, their code
runs and sends back information to their server.


It is free, but they get something out of it. They get to see how popular
your page is, and they can use that information to affect their awareness

Free download pdf