Start learning with our library of video tutorials taught by experts. Get started

Google Analytics Essential Training (2010)

Installing tracking code on a site


From:

Google Analytics Essential Training (2010)

with Corey Koberg

Video: Installing tracking code on a site

In the last movie, we just created an account, and now we are at this point where it's asking us to take the final step, which is to install the tracking code in your site that will actually perform the tracking. Installing Google Analytics isn't like installing a software product. All you are going to do here is paste this JavaScript they give you on every page of your site, and Google will take care of the rest. That's it. There really isn't anything to install, per se, other than just pasting this code. Now, what you see here is the new version of the code, known as the Async code, which is much faster and more flexible. There are a few options, depending on how your site is configured, and advanced users will want to modify the code to do things like track multiple accounts on one page, or set up advanced segmentation with custom variables, but to get the primary functionality of the tool right out of the box, Google Analytics can get the data it needs by just making sure this code is copied to the top of every page.
Expand all | Collapse all
  1. 6m 2s
    1. Welcome
      1m 13s
    2. How to get the most from this course
      3m 11s
    3. What's new in this update?
      1m 38s
  2. 5m 19s
    1. The pitfalls of hit counting and turning data into information
      3m 6s
    2. Web analytics: A tool and a process
      2m 13s
  3. 15m 30s
    1. Defining goals and conversions: Why do you have a web site?
      5m 40s
    2. Understanding data: Averages, segments, trends, and context
      1m 51s
    3. Introducing segments
      2m 38s
    4. Understanding trends and context
      5m 21s
  4. 11m 25s
    1. How does Google Analytics work?
      2m 18s
    2. Setting up an account
      2m 49s
    3. Installing tracking code on a site
      6m 18s
  5. 24m 20s
    1. Understanding accounts and profile administration
      6m 59s
    2. Navigating the reports and the Data Over Time chart
      4m 45s
    3. Selecting and comparing date ranges
      6m 50s
    4. Using annotations to make notes in data
      2m 30s
    5. Using the help tools
      3m 16s
  6. 24m 20s
    1. Viewing data in different formats (overview, tabular, pie, bar, compare to site)
      6m 10s
    2. Navigating data with site usage, goals, and e-commerce metrics
      9m 20s
    3. Sorting data with inline and advanced filters
      8m 50s
  7. 10m 26s
    1. Understanding the importance of segmentation in data analysis
      4m 40s
    2. Slicing data with dimensions
      5m 46s
  8. 7m 38s
    1. Why share data?
      1m 10s
    2. Managing user accounts and profiles
      4m 8s
    3. Emailing reports
      2m 20s
  9. 29m 12s
    1. Understanding who is visiting a site
      1m 20s
    2. Analyzing location data
      4m 52s
    3. Using language identification to segment users
      1m 35s
    4. Differentiating new users from returning users
      2m 1s
    5. Understanding visitor loyalty vs. recency
      4m 25s
    6. Comparing data according to visits, visitors, and page views
      2m 10s
    7. Sorting data by browser capabilities
      3m 56s
    8. Analyzing data from mobile browsers
      2m 34s
    9. Using flow visualization to see common paths
      6m 19s
  10. 23m 50s
    1. Linking an AdWords account to Google Analytics
      2m 46s
    2. Identifying campaigns and segmentation options
      5m 55s
    3. Using keyword reports
      1m 31s
    4. Fine-tuning your match type with the Matched Search Queries report
      3m 44s
    5. Optimizing traffic by time of day
      1m 37s
    6. Using the Destination URL report to identify landing pages
      1m 45s
    7. Identifying the best placement options for ads
      2m 0s
    8. Keyword positions
      4m 32s
  11. 40m 3s
    1. Understanding where site visitors come from
      2m 32s
    2. Analyzing the All Traffic Sources report
      2m 4s
    3. Identifying direct traffic
      2m 20s
    4. Identifying users who were referred to your site
      3m 9s
    5. Viewing search engine reports (overview, organic, and paid)
      4m 52s
    6. Introducing campaign tracking
      11m 17s
    7. Planning, creating, and logging a tracking strategy
      2m 58s
    8. Tracking offline campaigns
      7m 11s
    9. Finding data in a Campaign report
      3m 40s
  12. 36m 43s
    1. Analyzing top content by metrics and the navigation summary
      3m 29s
    2. Sorting top content according to page title
      3m 57s
    3. Understanding when to use content drilldown
      2m 25s
    4. Measuring the importance of top landing and top exit pages
      3m 41s
    5. Identifying slow-performing pages with the Site Speed report
      4m 6s
    6. Understanding the Site Search and Usage report
      3m 29s
    7. Analyzing the Search Terms and Search Term Refinement reports
      4m 12s
    8. Using the Site Search Pages report to understand how users search
      5m 19s
    9. Configuring Site Search
      6m 5s
  13. 33m 49s
    1. Understanding the Goal reports
      4m 24s
    2. Configuring goals
      9m 55s
    3. Understanding funnel visualization
      9m 48s
    4. Identifying value through E-commerce reports
      4m 35s
    5. Using goal flow to find detailed insights
      5m 7s
  14. 24m 25s
    1. Real-time data for time-sensitive analysis
      4m 21s
    2. Using intelligence alerts to flag important events
      8m 59s
    3. Creating custom intelligence alerts
      5m 48s
    4. Creating and customizing dashboards
      5m 17s
  15. 43s
    1. Goodbye
      43s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Google Analytics Essential Training (2010)
4h 53m Beginner Oct 08, 2010 Updated Dec 20, 2011

Viewers: in countries Watching now:

In Google Analytics Essential Training, Corey Koberg shows how to use the Google web analytics platform to generate and evaluate information about the visitors to a web site, including data on site traffic, user behavior, and marketing effectiveness. This course covers the out-of-the-box functionality, from account creation to reporting fundamentals, and explains how to glean insights from the vast array of data available.

Topics include:
  • Setting up an account
  • Installing tracking code on a site
  • Reading the dashboard and understanding high-level metrics
  • Understanding how visitors use and navigate web site content
  • Analyzing visitor and traffic source reports
  • Tracking AdWords and other marketing campaigns
  • Planning and configuring goals
  • Utilizing segmentation for deeper analysis
  • Understanding the raw data and how it's collected
  • Selecting and comparing date ranges
  • Using flow visualization to see how visitors navigate through a site
  • Identifying slow-performing pages
  • Performing real-time analysis
  • Using annotations and other best practices
  • Configuring and analyzing internal site search
  • Determining the best report view to use
  • Navigating reports with tabs
  • Cleaning up data with inline filters
  • Sharing data and reports
Subjects:
Business Online Marketing Web Data Analysis Web Analytics SEO
Software:
Google Analytics
Author:
Corey Koberg

Installing tracking code on a site

In the last movie, we just created an account, and now we are at this point where it's asking us to take the final step, which is to install the tracking code in your site that will actually perform the tracking. Installing Google Analytics isn't like installing a software product. All you are going to do here is paste this JavaScript they give you on every page of your site, and Google will take care of the rest. That's it. There really isn't anything to install, per se, other than just pasting this code. Now, what you see here is the new version of the code, known as the Async code, which is much faster and more flexible. There are a few options, depending on how your site is configured, and advanced users will want to modify the code to do things like track multiple accounts on one page, or set up advanced segmentation with custom variables, but to get the primary functionality of the tool right out of the box, Google Analytics can get the data it needs by just making sure this code is copied to the top of every page.

In this Essentials course, we don't want to get too far into the advanced configurations, but we will take just a moment to quickly touch on some of the options. If all you have is a single simple domain, then this code here is what you want. If you have a domain on a site that has multiple subdomains that you want to track all as one -- for example, maybe you have a shopping cart on one, or a blog, or anything else on a different subdomain -- you can select this second radio button here, and use this code. There is also an option here if you have multiple top-level domains, which are basically different URLs of different Web sites entirely.

This is a fairly advanced configuration with multiple steps here. You are going to have to add the additional code on to the links in the individual sites to get this working properly, and seen as a one big site. This configuration is a bit outside the scope of this course. If you do find yourself in this situation, you can go ahead and click on this question mark, you can do some reading with that, and seek out some assistance if needed. Back to this page. The second tap up here is the Advanced tab. We are going to be faced with the same options we had before, with a little more detail, but we also have a new one; a site built for a mobile phone.

It's going to give us some code we can put on our site that we don't necessarily have to rely on JavaScript to run. Now, JavaScript isn't going to run on some more basic mobile phones without a JavaScript-enabled browser, so this is going to use special server-side code. We have code samples here in PHP, Perl, JSP, ASP. The last one here is just a completely custom one, where we can edit the code inside here if we want to do some more advanced techniques we alluded to earlier, that requires you to add specific code to do custom tracking. We also have the option of tracking AdWords here back on standard tab by clicking this check box here, and the option to link your AdWords account.

Now, instead of utilizing this check box, we suggest you check out the video we have called linking your AdWords account, which will show you how to do this through the AdWords account's interface instead. Now, the vast majority of you are going to select this first tab with this first radio button for a single Web site, and that's what we are going to do here. Then we are going to come over here, click in here to select all the code, copy that into our memory, and the next thing what we are going to have to do is paste it on our site. Now, notice it wants us to paste it on every single page, and also that it needs to go specifically right before that closing head tag.

Now at this point, I need to pause and point out that if you are not familiar with your site's code, you'll want to seek some help from your administrator. Everyone's site is different, and you need to make sure you are doing it the right way for your site. On my particular site, we run WordPress, and one advantage of this is that it has a common header across all pages, which means, I only need to paste my code once in that header file, and it will show up automatically in all the pages on my site. So let's go ahead and take a look at that example. In my case, I am going to go here to my Web site editor, click on the Editor, and I have got all the different files of the site over here on the right. I am going to come over here and select the header file, and then what I am going to do is I am going to scroll down in this file, and I am looking for that closing head tag.

The closing head tag is just the bracket, and then a forward slash, and then word head. What I want to do is paste the code right before that particular tag. Now, we have some other code here that you can ignore, as it's not part of Google Analytics. I should also point out that we tend to do a lot of customization and beta testing, So if you are looking at my particular site, www.cardinalpath.com, it might not be the greatest plain vanilla example. But in this case, we ignore these three lines, and what we see right up here is our Google Analytics tracking code, which is almost right before the head tag.

Okay, we've got that pasted in; make sure it's right before the head tag. Come down here; update the file. Since I have updated my site with this code, I want to check and make sure that it is there, so I am going to go to my site. I am going to refresh the page to make sure I have the latest code, and then I am going to check View Page Source to make sure that that code actually did get updated on my site. I scroll down here, I find the closing head tag, and here I see my Google Analytics tracking code pasted in as it should be. Now, I want to be clear; instead of pasting the code over and over on each page, I took a shortcut by using a header file that's automatically included.

Now, this is because I'm using one of many Web sites that offer packages, such as WordPress, Drupal, Django, Movable Type, et cetera, that give me that option. If you have that option, which many of you will, I highly recommend that you take advantage. But if have a site built with just individual HTML files that doesn't offer this automated header, that's okay too. It just means you need to go in and paste the code on every single page of your site manually. After you've done that, we can go back to our Analytics window here, we can click Save, and assuming we have success, we will be able to go back up here to our Standard Reporting, and start to see some data in our accounts.

So here we have our analytics reports, but we don't see any data yet, because we just installed the tracking code. It can take one to four hours for this data to start streaming into our account. However, the other thing that I want to point out to you is that even if we refresh this page in one to four hours, we may not see any data here, because by default, Google Analytics' date range is set to show up to the most complete day, which was actually yesterday. Today's date isn't included by default. If I go over here and look at my date range, I am going to see the last month, up to yesterday. If I want to include today's date in there as well, I can simply click on today's date, click Apply, and update. And what we see is this tracking code has actually already started to collect some visitors for today.

So as you have seen, for a basic site, installing the tracking code is actually very simple. You just paste it in, so that it appears on every page of your site. However, if you do get this wrong, it can have a drastic effect on your ability to get accurate data. Sometimes having misinformation is worse than no information. So if you have a complex site that includes things like multiple domains, redirects, iFrames, Ajax, or Flash, or if you are just not comfortable with code, make sure you seek help if you need it, so we can analyze your data with confidence.

Find answers to the most frequently asked questions about Google Analytics Essential Training (2010).


Expand all | Collapse all
Please wait...
Q: The course was updated on 12/19/11. Can you tell me what's changed?
A: Many movies were updated to reflect the changes in the Google Analytics user interface and new movies were added to the course as well, with topics including using flow visualization to see common paths, identifying slow-performing pages with the Site Speed Report, using goal flow to find detailed insights on funnels and conversion paths, analyzing real-time data for time-sensitive analysis, and fine-tuning match types with the Matched Search Queries report.
Q: Where can I learn more about internet marketing?
A: Discover more on this topic by visiting internet marketing on lynda.com.
Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Google Analytics Essential Training (2010).

Return to your organization's learning portal to continue training, or close this page.


OK

Course retiring soon

Google Analytics Essential Training (2010) will be retired from the lynda.com library on May 14, 2014. Training videos will no longer be available, but the course will still appear in your course history and certificates of completion. For updated training, check out the all new Google Analytics Essential Training coming soon to the lynda.com Online Training Library.


Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked