Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Finding Out Who’s Viewing Your Web Pages 647

23


To add a profile, you just enter the name and URL of your website in the form provided
and choose the industry category and time zone for your site. After you’ve saved your
new profile, Google provides the code to paste into your own web page so that customer
visits can be tracked. The code itself is a snippet of JavaScript that loads the Google
tracking code. To install the Google tracking code on your site, copy the code that
Google provides into your own pages. Google recommends that you paste the tag just
before the closing tag on your pages. To start out, edit the HTML for your site’s
home page and paste in the Google Analytics code. Upload the page to your server if
necessary, and then visit that page in your browser.


After the page has been loaded with the Google Analytics tracking code in place, Google
Analytics will indicate that it has started tracking visits to your site. At that point, add the
Google tracking code to your other pages and upload them, too.


Using the Google Analytics Reports


After Google Analytics has been installed, it will start creating reports for your site
anywhere from 1 to 24 hours later. To view the main report for your site, just click the
Reporting tab. The Dashboard shows some basic statistics about use of your site—how
many visits you’ve gotten each day for the past month, a map showing where most of
your visitors come from, and which pages on your site are the most popular. You can see
an example of the Dashboard in Figure 23.4.


FIGURE 23.4
The Google
Analytics
Dashboard.

Free download pdf