Google Analytics E-commerce Tutorial

google analytics ecommerce conversion rate and google analytics enhanced ecommerce tag manager
ErrolFord Profile Pic
ErrolFord,France,Professional
Published Date:03-08-2017
Your Website URL(Optional)
Comment
E-commerce Concepts and Methods One of the most common reasons people use Google Analytics is that they have a web site that sells products and they want to know how to improve sales, what brings people to the site, and what users do while on the site. But what if you’re just getting started and someone has said to you that you need to have a product web site if you plan to have a presence on the Web? And what if those same people said you should also have Google Analytics, even though you’re not quite sure what e-commerce is or what analytics are? For all you know e-commerce and analytics could be some strange diseases that you really don’t want, but that your competition would like for you to have. It’s not that dire, of course. E-commerce is all about selling products on the Web. And as you’ve probably g fi ured out by now, analytics are about measuring the visitors to your web site and their behaviors. The trick, though, is making the two go hand in hand. What Works in E-commerce What works in e-commerce? That’s really a loaded question. And to be completely frank, it’s a question to which there is no exact answer. In the past, some said you would never be able 73 74 Part IIn Analytics and Site Statistics: Concepts and Methods to sell anything more than books on the Web. Others said there was no way you could put a giant ea fl market on the Web and expect to make money. Amazon and eBay proved them wrong. What works in e-commerce is whatever there is a demand for. That’s an oversimplic fi ation, of course. You could expand that simple statement to be more accurate by saying that what works in e-commerce is whatever there is a demand for and whatever you can reach the right audience for. That’s where Google Analytics becomes a natural partner to e-commerce, because what better way to learn if you’re reaching the right audience than by understanding how those who come to your site use it? Half of the g fi ht when you’re building an e-commerce business is reaching the right people with the right products. For example, a few years ago, everyone thought that you couldn’t make a successful business out of selling electronic books (also called e-books). Yet even then a few companies were relatively suc- cessful with their endeavors, because they knew the market that they needed to target with these books. Of course, that was back before Google Analytics, so some of those successful companies used analytics applications that weren’t free. Others used the free analytics programs that were available, but they were nowhere near as useful as what you’ll find available today. Today, too, the market for electronic books is much larger and growing every day. For example, Amazon probably recognized a growing number of electronic book downloads, which prompted the company to think about what it could do to capitalize on that market. That’s where the idea for Kindle (the Amazon- branded e-book reader) came from, and why Amazon has had so much success in that particular market. As you can see, successful e-commerce is starting with an idea—a way to meet a specic fi need that is either not being met at all, or is being met in a limited way—and then growing that idea by learning what your customers want. Just about any e-commerce business that you recognize as successful today can be categorized in that way. A good example might be an e-commerce business like NewEgg (www .newegg.com) or TigerDirect (www.tigerdirect.com). Both of these are e-com- merce businesses built around technology products. They both offer very spe- cic fi types of technological gadgets at great prices. And they both target very specic a fi udiences. NewEgg is a little more tech-oriented than TigerDirect. What leads someone to start an e-commerce business is different from what helps that person to be successful. Maybe you start your little business because it’s something that’s dear to your heart. I’ve known people who started e-commerce businesses because the products they feature are ones for which they have a deep passion (think Christian jewelry or solar energy products). But having a passion about sharing a product is not enough to make an e-commerce business successful. Chapter 6n E-commerce Concepts and Methods 75 You must also have an audience—a group of people (other than your friends and family) who want or need to purchase the products that you are passionate about. And to be sure, it’s easy enough to find a few people who will purchase just about anything. But a few purchases do not a successful e-commerce busi- ness make. Which means there must be more, right? Understanding Your Customers Businesses in the real world—called brick-and-mortar businesses—become suc- cessful by knowing their customers. Those businesses spend millions of dollars each year studying how their customers interact with their storefronts. Ever wonder why you can walk into any Wal-Mart in the world (and they are all over the world now) and see the image of every other store in the chain? That’s because the marketing experts at Wal-Mart have studied their customers to learn what works and what doesn’t. Think about going down the pasta aisle of such a store. You’ll find both pasta and pasta sauce on the shelves of that aisle. But you will probably also find fix- tures attached to the shelves, sticking out slightly, that hold grated parmesan cheese. That’s because someone took the time to analyze the shopping habits of Wal-Mart visitors and realized that most of the time, when visitors purchase pasta and pasta sauce, they also want to purchase parmesan cheese. Now, if the parmesan cheese were located in another aisle, let’s say in the dairy case with the other types of cheese, visitors might forget to pick up the cheese when they got to that part of the store. Having it available on the shelf, in the same vicinity as the pasta and the sauce, helps shoppers remember they need it. Wal-Mart, being thorough, also has parmesan cheese available in the dairy case, along with the other cheeses. If you forget to pick it up while you’re in the pasta aisle (and how many times have you stared directly at something and not seen it?), then seeing it in the dairy case might remind you to pick it up. That tracking of customers’ movements and buying habits is the real-world equivalent of Google Analytics. Various types of data (such as visitors’ move- ments through the store, their purchasing habits, and even the time of day that they’re shopping) are collected, and then later analyzed for patterns. Google Analytics works the same way with your e-commerce web site. Installing Google Analytics is like putting up surveillance cameras, capturing transactions, and logging visits to your site, then pooling all that information together so you can see the patterns that are present in a very clear way. 76 Part IIn Analytics and Site Statistics: Concepts and Methods Let’s look at it like this. Say you’ve got an e-commerce site for books, and you notice that one particular title seems to be selling much better than the other titles on your site. By itself, that wouldn’t mean much to you. Then assume that you’re seeing a lot of trafc fi coming from one particular web site. When you look at the web site from which that trafc fi is coming, you notice that there’s a review of the book and a link back to your site because you have the best price on it. Now you’re starting to see a pattern emerge. People coming to your site from this review are buying the book that was reviewed. Leaving every other aspect of e-commerce and analytics out of this example, you can assume that maybe your site visitors would like to read reviews of the books that you offer. You can test that theory, too, by putting a few reviews on your site and tracking visitors to those reviews who complete a purchase (either of the book reviewed or any other book). Then you’ll know if it’s just the review that’s drawing people to purchase the book from your site, or if it’s a combination of the book and something else or even some other facet of the linking page altogether. This is a very simple example, but through it you can begin to see the power that analytics has when used to monitor an e-commerce web site. Using ana- lytics you can catch short but revealing glimpses into the minds of the people who visit your web site. What Measurements Matter Once you understand that your e-commerce site first has to have an audience, and then that you should be monitoring that audience, you might wonder just what exactly you should be measuring with your analytics application. Google Analytics does a pretty good job of laying out the basic needs. You should be monitoring visits, of course, but you also need to be monitoring visi- tor movements and behavior on your site. Not only do you want to know where visitors come from, but you also want to know what visitors do while they’re on your site. Do they come onto the site, surf through a dozen pages, and then leave? Why? Analytics can give you the patterns that lead you to see why they are leaving. Analytics can also show you exactly the spot from which the visitor leaves. And though analytics won’t tell you exactly why your visitors abandon your site, it might give you a glimpse into the possibilities. Think about this. Suppose that you have an e-commerce site to which visitors come in large numbers. And looking at your analytics you see that the majority of your visitors surf through your site and put products in their shopping cart, but then leave your site during the checkout process, before they complete the purchase. Chapter 6n E-commerce Concepts and Methods 77 Using this information, you can assume there’s something that’s killing your sales. If you’re tracking every step of the checkout process, you can even know exactly where in the process your visitors seem to slip away. Then you can examine that spot closely to learn more about what could possibly be wrong. In our example, let’s assume that visitors slip away once they hit the ship- ping information page of your checkout process. This could be because your shipping costs are prohibitively high. It could also be because users experience errors when they’re trying to fill in their shipping information. But no matter what the reason is, if you know that you’re losing most of your visitors on that shipping page, then you know where to look to find the exact problem. Analytics works on the success side, too. If there’s something that you’re doing very well, you’ll see that pattern also, because analytics doesn’t just illustrate the bad things that happen with your site visitors. It also illustrates the good things. For example, say you notice that one of your products is outselling every other product on your web site. Since you can see where your visitors are com- ing from and you find that the majority of them are not coming through your AdWords ads, then you might recognize a pattern that indicates your visitors are coming from an article on another web site. Watching that trafc fi as it navigates through your web site, you may also see that most of your sales come from visitors led to your site by that outside link. You can then look at the page that’s pushing visitors to your site to learn what’s so compelling about it. Maybe there’s something on that site that you should be emulating on your own site. But you shouldn’t limit your interest in e-commerce measurements just to your visitors’ movements and the fact that they do or do not make a purchase. Monitoring your products, the average amount that visitors spend during a purchase, and even how long it takes a visitor to commit to finishing a pur- chase transaction can also tell you important things about your site visitors. If you’re monitoring the time it takes visitors to commit to a purchase and you learn it takes them three visits (on average) before they complete the purchase, then you know that you’ve got to either keep their attention for three visits, or find a way to decrease the amount of time it takes them to make the decision to purchase. The average amount of a purchase is an indicator of how well your product layout is working. The higher the average amount of the sale, the better you’re doing (excluding high-ticket items, of course). That usually means your visitors are buying more than one item, which could be a ree fl ction that your product selection is not only good, but also well targeted. But low sales might indicate that you could lay out your product selection better to help users find similar or complementary items that would catch their interest and help them make the decision to buy additional items. 78 Part IIn Analytics and Site Statistics: Concepts and Methods With e-commerce measurements (as with all analytics), it’s all about under- standing what it is that your site visitor wants or needs. Analytics can give you a glimpse into the patterns of your web-site visitors. Then, using those patterns, you can make some educated guesses as to what you could be doing better, doing differently, or adding to your arsenal of possible efforts. To some, e-commerce seems like a mystery. It is, in a way. But the best way to reduce the amount of mystery in e-commerce is to be prepared by understand- ing your consumers—your site visitors. Analyze your visitors in the same way that brick-and-mortar stores analyze their shoppers. Then you’ll begin to gain an understanding of how to go from having just an e-commerce business to having a successful e-commerce business. C h a p t e r 7 Basic Metrics and Concepts When you begin looking at your Google Analytics metrics, you might find some of them confusing. In fact, some metrics simply make you think, “How in the world did they come up with that number?” It’s a problem that’s plagued analytics users since the very first analytics applications hit the market. Understanding just what exactly is being measured (and how) is easily half or more of the process of understanding your visitors’ behavior. For example, if you don’t know that there are differences among visits, new visits, and unique visits, then you’re not going to be able to fully understand how those metrics affect you. What follows is a quick and dirty primer on just what some of the metrics that you’ll find in Google Analytics mean. This is not a comprehensive guide by any means. But it’s my hope that when you’re finished with this chapter you’ll have a clearer understanding of how Google arrives at the metrics that it displays, and what those numbers mean to you as far as building and capitalizing on web site trafc a fi re concerned. Identifying People and Not-People Generally, visits to your web site that are counted in Google Analytics are made by “people,” meaning actual people (to the best that Google can determine) using web browsers to view your web site. In actuality, Google Analytics counts 79 80 Part IIn Analytics and Site Statistics: Concepts and Methods IP addresses (from your web browser) as people. But there are many visits to your web site that don’t actually come from people using a web browser. These “not-people” are applications—spiders, crawlers, and robots—that are assigned the task of reviewing your web site for some reason. For example, search engines use these critters for the purpose of examining and classifying your web site for search engine results that are returned when someone searches for a topic or phrase through the search engine. However, how a visit from a person and a visit from a spider, crawler, or robot are executed is what determines how these two classes of visitors are quantie fi d. Visitors—actual people using web browsers—are classie fi d by IP address. In the simplest explanation, your web browser requests a page to display for you from a web server, and in that request is a header that identie fi s where the request is coming from. It contains your web address, in the form of an IP address. (That’s that funky-looking number that you sometimes see associated with web sites. It might look something like196.255.86.86.0 (not a real link). That is the numerical equivalent of a web address likewww.example.com.) This IP address represents your actual location on the Web. Think of it like your house location, and for the moment let’s assume the “web page” you want to see (the one you’ve requested) is actually a package that needs to be delivered to your house. What happens when you request that package is that you provide a location for it to be delivered to—a house number, street, city, state, and if necessary a country. Without that information, the package could not be delivered to you. When you think of the web page your browser has requested in these terms, the IP address can be thought of as an address (or route) that leads right down to the local web server that provides your Internet access. The IP address is specic t fi o your location on the Web. When a “not-people” visitor—a crawler, spider, or robot—wants to look at your web site, it also sends a request. What differs is the way the critter identi- e fi s itself. Rather than saying, “Hey, this is what I want and this is how you know me,” the crawler says, “I need only this specic fi information and I’ll take it with me.” It’s almost the cyber-world equivalent of going past a drive-through window. The crawler identie fi s itself in the same way your web browser does, and it also usually provides a name or some other credential (e.g., a Google web crawler identie fi s itself as Googlebot). n o t e I’m using “crawlers” from this point forward to refer to all crawl- ers, spiders, and robots. There really is no difference, so they’re generally all lumped together. Chapter 7n Basic Metrics and Concepts 81 To be slightly more technical about these crawlers, when they request a web site, they request a stripped-down version of the site. The crawler doesn’t need all the aesthetics that you and I need or want to see on a web site. The crawler is interested in more serious elements such as keywords, links, and the location of elements (such as headers). The next major difference is in how the crawler identifies what it wants. Rather than tell the web server it wants a page, it tells the web server that it wants information from the page. This is usually accomplished when the crawler identie fi s itself as a user agent (such as Googlebot) by sending an HTTP request that asks for a different version of the web site. The really confusing part comes when you realize that sometimes Google Analytics doesn’t recognize the difference between people and not-people. Google Analytics is, after all, only an application, so there are limitations to what it can infer from appearances. And if the crawler appears to be a web browser, Google Analytics can’t tell the difference. Crawlers don’t always identify themselves as crawlers. What does that mean for you? Simply put, it means that there is a margin of error in your Analytics visitor data. It’s generally a small margin of error, and considered acceptable in analytics, but a margin of error nonetheless. Visits and Visitor Metrics A visitor is a visitor all the time, right? Well, not if you’re an analytics program. Analytics programs look at visitors from several different angles to see just how exactly those visitors qualify as visitors on your site. Are they new? Have they been here before? How long has it been? It’s a confusing mess of nuances and detail. But once you understand all the little things that make the numbers work, you get a much better picture of your site visitors and how well you’re doing at keeping them interested in your web site. Hits vs. Pages Rather than starting with visitors, let’s start our journey into analytics basics with a topic that’s caused confusion for a lot of years. Hang with me for a few moments; this will start to make more sense soon. Background first: The first few years that web sites were a reality, webmasters drew a lot of pride from the number of hits their web pages garnered. Hits were such a big deal that any webmaster worth his salt placed a hit counter on his web site for all the world to see (this was, after all, bragging rights). And these hit counters could be pretty stylish, too. In fact, the cooler they were, the more attention 82 Part IIn Analytics and Site Statistics: Concepts and Methods they drew, meaning more people saw (and took note of) the number of hits showcased. High numbers of hits were to be envied. There was one small problem with this method of counting, though. As it turned out, hits were a pretty worthless metric because to a web server, any access of any document—a page, a script, a multimedia file, an image, or any other element classie fi d as a document—counted as a hit. And depending on how the web page was designed, a single page, loaded one time, could count multiple times, creating the illusion of multiple hits. As analytics became better understood, this disparity between hits and page views became more apparent. Naturally, a new metrics blossomed—page views. Now, if we’re just going to get straight to the truth here, page views as a metric are a much better measure- ment than hits. Page views in analytics don’t refer to what you might think of as a page, that being everything included on the page. Separate elements can still qualify as pages (in the same way that those elements previously counted toward hits). Typically, certain technologies, such as Flash, AJAX, media files, downloads, documents, and other elements that can be included on a web page can be counted toward page views in analytics. This doesn’t usually include requests for images or Cascading Style Sheets, which used to be included in the number of hits a page received. Even with the misleading nature of hits and page views, the metric for page views can still be useful. Hits as a metric are pretty much useless these days, but the metric for page views can give you an understanding of which pages (or elements of pages) are working for you. You can also look at the number of page views per visit to determine the depth of the visit, and if you track this information over time you may find patterns that you can use to change and improve the content offerings on your web site. Visits, Unique Visits, and New Visits When you’re discussing how metrics are derived, this is where the waters go from murky to downright muddy. Understanding what counts as a visit, a visitor, a unique visitor, a new visitor, a returning visitor, and a repeat visitor will have you ready to throw mud pies at the lunatic who came up with these metrics. (Also, Google uses the term Absolute Unique Visits to refer to Unique Visits in Google Analytics reports.) We’re not going to throw mud pies, of course. Instead, let’s see if we can g fi ure out just how each of those metrics is derived, and how each affects your analytics measurements. A good place to start clarifying how visitors are counted is with some defini- tions from the Web Analytics Association (WAA): Chapter 7n Basic Metrics and Concepts 83 n■ Visits: A visit is an interaction, by an individual, with a web site, consist- ing of one or more requests for an analyst-definable (that’s an element of the page that can be tracked) unit of content (i.e., page view). n■ Unique visitor: The number of inferred individual people (filtered for spiders, crawlers, and robots), within a designated reporting time frame, with activity consisting of one or more visits to a site. Each individual is counted only once in the unique visitor measure for the reporting period. n■ New visitor: The number of unique visitors with activity including a first-ever visit to a site during a reporting period. n■ Repeat visitor: The number of unique visitors with activity consisting of two or more visits to a site during a reporting period. n■ Return visitor: The number of unique visitors with activity consisting of a visit to a site during a reporting period, who also visited the site prior to the reporting period. The WeB AnAlyTICS ASSoCIATIon: An AnAlyTICS STAndArdS Body The Web Analytics Association is a standards body for web analytics. This group includes consultants, educators, and vendors, all working together to reach a standard set of guidelines for web analytics and the measurements associated with analytics. Back in 2006, WAA formed a committee to develop some standard analyt- ics definitions that would help users understand how certain metrics were derived. Those standards were released in 2007 and are the definitions that are used in this (and other) chapters. To learn more about WAA, its mission, and how you can get involved, check out its web site athttp://www.webanalyticsassociation.org/ Each of these metrics is a different measurement, but sometimes the dif- ference is nothing more than a subtle (but important) nuance in the way the visitor is counted. Understanding these subtleties begins with understanding how visitors are counted. New, Returning, and Repeat Visits By now you know that Google Analytics uses cookies to count visitors. The very first time a visitor comes to your web site, a cookie containing a unique identie fi r is placed in the visitor’s web browser. That’s how visitors are recognized each time they begin a new session (or visit) on your site. 84 Part IIn Analytics and Site Statistics: Concepts and Methods On that very first visit, the cookie is issued and the visitor is counted as a visit. However, because it’s the first time this person has visited your site in this reporting period, he or she is also counted as a unique visitor, and because it’s this person’s first visit ever to your site (at least from the computer that person is using at the time), he or she is also counted as a new visitor. It would seem that a unique visitor should be a person coming to your web site for the first time ever, but that’s not really the way it works. A unique visi- tor can actually be someone who’s been to your web site before, but not in the same time period that’s being monitored. So let’s say that you’re monitoring your web statistics monthly, and during January, Suzie comes to your web site for the very first time ever. On that visit, she’s counted as a visitor, a unique visitor, and a new visitor. Then Suzie gets enthralled with some other web site, so she doesn’t return to your site again for at least 30 days (the default reporting time period in Google Analytics). But in late February she remembers your site and stops by again. This time Suzie is counted as a visit, a unique visitor (because this is the first time in this reporting period that she’s stopped by), and a return visitor (because although she’s a unique visitor, she has been to your site before, so she’s not a new visitor). If Suzie decides to come back to your site later that same day or the next day (assuming she’s still in that 30-day reporting period), she’s then counted as a visitor, a repeat visitor (because she’s returning in the same reporting period), and a return visitor, but she won’t be counted as a unique visitor, because she’s already been counted as unique for the reporting period. See, subtle differences. But these subtle differences can provide a wealth of information about a visitor or group of visitors. For example, what if your num- ber of unique visitors is high, but your number of new visitors is low? My first thought in that situation would be that your site has good stickiness— visitors who have been to the site before are returning at relatively regular intervals. But the low number of new visitors would indicate that you’re not being found often enough. This could indicate that you need to step up your search engine optimization (SEO) or marketing efforts. And if you’re already push- ing heavily in those areas, then you might need to examine your efforts more closely to see what you could change or improve. The way visits and visitors are counted can be a little confusing, but once you understand who qualie fi s to be included in what metric, what you’re seeing in your Google Analytics account begins to make more sense—even though in Google Analytics the metrics that you have are labeled visits, absolute unique visits, and new visits. Chapter 7n Basic Metrics and Concepts 85 SeSSIon TIMeouTS One factor in how visits are calculated is called session timeouts. This isn’t represented by an actual metric of any type by Google Analytics, but it can affect the number of visits, return visits, and repeat visits that you might see. A timeout happens when a visitor comes to your site and then goes idle for a period of time. In the case of Google Analytics, a visitor who’s been idle for 30 minutes has the session terminated. Even if the visitor begins to surf your site again after that 30-minute period, this person is now counted as another visitor. This can cause single visitors interrupted by something (like screaming kids or a telephone call) while they were on your site to be counted as two visitors. You can change the default session timeout for Google Analytics by alter- ing your Google Analytics Tracking Code. All you have to do is change the highlighted line in the following code sample to reflect the number of seconds (yes, seconds, not minutes or hours) that you would prefer to use as a session timeout. Google’s default of 1,800 seconds, for example, can be changed to 3,600 seconds, making the timeout take effect after one hour of idleness. Change session timeout: script type=”text/javascript” var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”); document.write(unescape(“%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”)); /script script type=”text/javascript” try var pageTracker = _gat._getTracker(“UA-xxxxxx-x”); pageTracker._setSessionTimeout(“1800”); pageTracker._trackPageview(); catch(err) /script Visit Duration Another metric that you might find helpful is the “duration of visit” metric. This is a measurement of how long visitors spend on your site and you’ll find it in two separate reports in Google Analytics: the Time on Site and Length of Visit reports. I’ll look at both of those reports in more depth in Chapter 15, so for now let’s just examine what is meant by visit duration. 86 Part IIn Analytics and Site Statistics: Concepts and Methods When visitors enter your web site, they are “clocked in,” so to speak, much as you would punch a clock when going to work. Since Google Analytics is monitoring visitors by a unique identie fi r (in the form of a cookie), a time stamp is made in the server logs when that unique identie fi r shows as being present on your web site. That identie fi r is tracked as the user navigates through your site. Then, when the visitor leaves your site—either by closing the browser or by navigating to a different web site—another time stamp is created. It’s as if the user “clocks out” of your site. The out-time stamp is then subtracted from the in-time stamp to determine the total time the visitor spent on the site. Depending on the analytics program you’re using, that information can be aggregated or segmented in different ways—as average time spent on site, aver- age time spent per visitor, or even average time spent per page per visitor. In the case of Google Analytics it’s given as the average time spent on the site and the percentage of visits in a given duration. But why should you care how long a visitor spends on your site? Simply put, you can equate the length of time a visitor spends on your site with the amount of interest your site generates for that visitor. For example, if a visitor navigates into your site and spends 10 minutes looking through your content, it’s a safe bet that you’ve captured that person’s interest. Additionally, the longer a user spends on the site, the more likely that user will be not only to return at a later time, but also to reach whatever goal conversion you may have set up for visitors. On the other hand, if you have a visitor who comes to your web site and stays only a few seconds or even leaves immediately, you can infer that something is wrong—either the visitor found your site through an unrelated search, or found your site through a related search but didn’t find what was being sought. The visitor also, apparently, found no indication that the desired information could be found by digging deeper into your site. Either way, a high number of these ultra-short-duration visits—called bounces—indicates there could be a problem that you need to address. Bounces and Single-Page Visits A bounce can be slightly more complicated than simply equaling someone who came to your web site and left immediately. Strictly speaking, a bounce is con- sidered a single-page-view visit. What that means is that a person who comes to a page on your site and navigates to no other pages, but instead leaves from that same page, may not be considered a bounce. He or she could, instead, be considered a single-page visit. A bounce is all about interaction. Remember how a single page can represent multiple page views? Well, that’s what separates a bounce from a single page Chapter 7n Basic Metrics and Concepts 87 view. For example, if a visitor clicks into your site and immediately clicks the Back button, then this will probably be considered a bounce. But if the same user clicks into your site, allows it to fully load, and spends a few seconds glanc- ing at the content (in other words, interacting with the page), then this could be considered a single-page visit instead of a bounce. This is especially true if there are elements on your page such as videos that the visitor allows to load before clicking away. The distinction between the two metrics is important, because a bounce tells you there was nothing of interest to the visitor on the page. A single-page visit means your first page was marginally interesting, but not interesting enough to draw the visitor deeper into the site. Both numbers, however (when they are high), are indicators that you need to concentrate on improving your web-site targeting. If either number is high, you’re drawing the wrong visitors or not providing what the right visitors need. In Google Analytics, the bounce rate is the same as the rate of single-page visits. Google counts visitors who come to your site on one page and leave from that same page without navigating to other pages within the site as bounces. The number of visitors who “bounce” away from your site is then compared to the number of all site visitors and a percentage is arrived at that represents the bounce rate. Trafc M fi etrics As valuable as visitor and visits metrics are, they aren’t the only metrics from which you can gain insight. Where visits and visitor metrics tell you about user behavior, trafc fi metrics tell you what brings visitors to your site. What draws (or pushes) users to your site? Do they come to it directly? Or do they navigate in from another web site or marketing campaign? All these are important elements of how users find your site that you need to understand. Consider them measurements of how users find you and how well you’re tapping into the relevant sources. They’re also a good means of finding new avenues through which you could be driving (or pulling) trafc fi . Direct Trafc fi , Referrers, and Referring URLs Direct traffic is a measurement of the number of people who come directly onto your web site. That can mean visitors who type your web-site address directly into the address bar of their web browsers, but it can also mean visitors who click into your web site from a link they have saved to their favorites. Unfortunately, in Google Analytics there is no way to tell the difference. So for the purposes of this metric, it could be either. 88 Part IIn Analytics and Site Statistics: Concepts and Methods When a visitor comes to your web site, he or she is visiting with a web browser, which communicates with the web server to tell it what site the user wants to see or where this user wants to go next. So when a user opens his or her web browser and types a URL into the address bar, the browser sends a request to the web server for the URL that the user typed into the browser. The request is formatted with a header that contains information about where the request came from. In the case of the user who types a URL directly into the address bar, that header contains no information about where the request came from. This is read by the web server as “no referrer” or “direct navigation.” That’s where direct trafc c fi omes from. But suppose this user is on another web site and clicks through a link to your web site. In that case the web browser includes in the referrer e fi ld of the header the URL of the web site the user was on when he or she clicked the link leading to your site. That becomes the referring URL. It’s the “page URL that originally generated the request for the current page view or object,” according to the WAA. As tidy as this all sounds, sometimes it’s not all that clear-cut. For example, say a user clicks a link that leads to your web site from a page that’s part of a frame set. Frame sets are web pages designed around a set of frames that separate page elements. This can make them appear to be several different pages, rather than a single cohesive page. So when the user clicks a link on the framed page, the web server has to determine the original page from which the request is coming. And sometimes that can be a little confusing. It’s also possible that the visitor clicks a link to your site from a subdomain within a web site. Again, the web server has to track that subdomain back to the original domain for the purposes of identic fi ation. So in some cases, rather than the subdomain showing as the referrer, the actual domain shows as the referrer. It can, at times, be misleading when you’re looking at your metrics. For the most part, however, the referrer or referring URL is the place from which the visitor came to your site. And this can be handy information to have. For example, a few years ago I was tracking the referrers to my personal web site. What I found was that a web site with which I had partnered about v fi e years earlier was still referring visitors to my site. A lot of visitors. I no longer had a relationship with that site, but after reviewing my metrics I saw the need to rekindle that relationship. It was an existing avenue of trafc fi for me, based on an old listing. Adding a new listing turned the trafc fi up a notch and brought better targeted results from that particular referrer. Keywords and Phrases One last measurement that you might want to understand a bit about before we move on to e-commerce metrics: keywords and keyword phrases. These are the Chapter 7n Basic Metrics and Concepts 89 terms visitors use to find you when they use search engines. Let’s say you’re looking for a recipe for chicken cacciatore. When you type that keyword phrase into a search engine, the first result that you’re likely to see will be for a web site like the Food Network or AllRecipes.com. That’s because these sites have been optimized for this particular keyword or keyword phrase. Keywords are used to classify your site for search engines, but they can apply to your site in one of two ways. Paid keywords or keyword advertisements (such as those you can create with Google AdWords) are keywords and keyword phrases that you spend advertising dollars to target. These keywords are used in advertising campaigns that draw visitors to your site when they search for a specic fi keyword. If you’re using a paid keyword advertising campaign, your site needs to be well optimized for the keywords that you’re targeting, because when visitors find you through one of those advertisements they’re searching for something pretty specic fi . It would be a shame to pay for those visits and then lose the visitors as bounces because you’re not meeting their needs. The other type of keyword is organic. Organic keywords are the keywords and keyword phrases visitors use to find your site but that you don’t pay for. These you can consider bonuses. Search engine crawlers will automatically classify your web site based on content. Part of that content is the words that you use on your pages, and the ones that are repeated most frequently are keywords. If you find that your site is being classie fi d by organic keywords, you should consider trying to capitalize on these keywords, assuming they’re reaching the right target market. Organic keywords are hard-won victories in drawing trafc fi . In Google Analytics you’ll find metrics for keywords, and metrics for AdWords (paid keywords). These will help you understand what words and phrases visitors are using to find your site. These are the basics of how Google Analytics (and other analytics programs) arrives at the metrics it provides for you about your site visitors. You could probably spend a lifetime learning about the different metrics and how they’re calculated, but it’s not necessarily a requirement for understanding what Google Analytics is trying to tell you. Once you understand the basics you’ll understand how your visitors inter- act with your site, and isn’t that the ultimate goal of using Google Analytics anyway?Setting Up E-commerce Google Analytics has the ability to collect product revenue, item information, and transaction data from sales that happen on your online store in a very special e-commerce report section. This section appears below the Goals report section when enabled, and also appears throughout the Google Analytics inter- face in a tab or as an additional trending graph, custom report, and advanced segmentation options. To be able to collect this highly valuable information, you will need to roll up your sleeves and put on your technical hard hat—because there is some custom programming and possibly an obstacle or two to negotiate along the way. Even if this isn’t your gig—that is, even if you are not a technically savvy individual—you can still take in the information in this chapter, which will enable you to understand how e-commerce data looks in source code format. This will come in handy for diagnostic purposes if there are ever issues, bugs, or garbled data in your e-commerce reports. n o t e If you’d like to read about the metrics, reports, and insights that you’ll be able to obtain from the E-commerce section, then before reading this chapter flip back to Chapter 6 and forward to Chapter 20. The present chapter deals mostly with the programming and implementation side of e-commerce with Google Analytics. 91 92 Part IIn Analytics and Site Statistics: Concepts and Methods Enabling E-commerce within Your Profile(s) The very first step in activating e-commerce reporting within your Google Analytics profile(s) is selecting Yes, an E-Commerce Site from within the Main Website Profile Information editing screen as shown in Figure 6-1. Click Save Changes at the bottom of this page, and you’re done on the profile side of things This is arguably the easiest thing that you’ll ever do. Now let’s men- tion a few other things before moving on to the coding/implementation part of e-commerce. First, don’t forget that you’ll have to do this for every profile you want to track e-commerce data with. Second, don’t forget that your profile is going to display the correct currency—select the currency of choice from the Currency displayed as drop-down menu shown in Figure 8-1. (There are more than 20 currencies from around the world to choose from, but keep in mind that Google Analytics will not perform currency conversions for you—you’ll have to do that on your own.) Finally, a little-known fact: even if you forget to edit your profile, e-commerce data will still be collected and processed by Google, which stores it within its data centers. So if you have e-commerce coded correctly on your web site, and don’t remember about turning it on until later, all collected data will still appear throughout your profile. This is one of the only situations with Google Analytics in which data can be “recovered,” (even though the data has been there the whole time). Figure 8-1: E-commerce profile settings