Google Analytics Certification Notes
Upcoming SlideShare
Loading in...5
×
 

Google Analytics Certification Notes

on

  • 11,284 views

These notes were taken from the slides in the Google Analytics IQ Certification course material. Use them in addition to the slides.

These notes were taken from the slides in the Google Analytics IQ Certification course material. Use them in addition to the slides.

Statistics

Views

Total Views
11,284
Views on SlideShare
11,148
Embed Views
136

Actions

Likes
8
Downloads
568
Comments
2

3 Embeds 136

http://www.lamigadepan.es 119
http://www.linkedin.com 16
https://twimg0-a.akamaihd.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • I can help you guys pass this exam fastly. Pls drop me a pm to my gmail: nhinquattran
    I can pass Adwords tests also
    Are you sure you want to
    Your message goes here
    Processing…
  • thanks
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Google Analytics Certification Notes Google Analytics Certification Notes Document Transcript

  • INTERPRETING REPORTS........................................................................................................2 Pageviews................................................................................................................................................2 Time Metrics..........................................................................................................................................3 Traffic Sources.......................................................................................................................................3 Campaign Attribution.............................................................................................................................................4 Content...................................................................................................................................................5FUNDAMENTALS........................................................................................................................6 Account Administration........................................................................................................................6 Campaign Tracking & AdWords Integration.....................................................................................6 Data Discrepancies.................................................................................................................................................8 Manual Campaign URL Tagging...........................................................................................................................9 Analysis Focus-Ad Words...................................................................................................................11 Reports ................................................................................................................................................................12 Goals.....................................................................................................................................................14 URL Destination Goal..........................................................................................................................................15 Time on Site.........................................................................................................................................................16 Pages Per Visit.....................................................................................................................................................16 Reverse Goal Path Report....................................................................................................................................18 Filters....................................................................................................................................................18 Using Filters & Profiles.......................................................................................................................................20 Regular Expression..............................................................................................................................22 Cookies.................................................................................................................................................27 Ecommerce Tracking..........................................................................................................................32 Secure Pages.........................................................................................................................................................34 Domains & Subdomains......................................................................................................................34 Tracking Across Multiple Subdomains................................................................................................................34 Tracking Across Multiple Subdomains................................................................................................................35 Tracking Across Multiple Domains with Multiple Subdomains.........................................................................37IN-DEPTH ANALYSIS................................................................................................................37 Advanced Segmentation......................................................................................................................37 Analytics Intelligence...........................................................................................................................39 Internal Site Search.............................................................................................................................39 Event Tracking and Virtual Pageviews..............................................................................................42 Virtual Pageviews................................................................................................................................................43 1
  • Event Tracking.....................................................................................................................................................43 Additional Customizations..................................................................................................................46 How To Change Session Timeout Value.............................................................................................................46 How to Change Campaign Expiration.................................................................................................................46 How to Change Campaign Precedence................................................................................................................46 How to Add Search Engines:...............................................................................................................................47 How To Treat Certain Keywords As Direct.........................................................................................................47 How to Treat Certain Referring Sites As Direct..................................................................................................47*These notes are complements of the Goole Analytics IQ Lessons. You can find these notesand slides via this link: http://www.google.com/intl/en/analytics/iq.html?INTERPRETING REPORTSPageviewsA pageview is counted every time a page on your website loads. ● So, for example, if someone comes to your site and views page A, then page B, then Page A again, and then leaves your site -- the total pageviews for the visit is 3. ● If a visitor hits reload after reaching the page, this will be counted as an additional pageview. ● If a user navigates to a different page and then returns to the original page, an additional pageview will also be recorded. ● Found in the Audience and Content SectionA unique pageview represents the number of visits during which that page was viewed--whether one or more times. ● In other words, if a visitor views page A three times during one visit, Google Analytics will count this as three pageviews and one unique pageview. ● Found in the content section ●A visit -- or session -- is a period of interaction between a web browser and a website. ● Closing the browser or staying inactive for more than 30 minutes ends the visit. ● For example, a visitor is browsing the Google Store, a site that uses Google Analytics. He gets to the second page, and then gets a phone call. He talks on the phone for 31 minutes, during which he does not click anywhere else on the site. That’s 3 pageviews and 2 visits. ● The “New vs. Returning” report classifies each visit as coming from either a new visitor or a returning visitor. So when someone visits your site for the first time, the visit is categorized as “Visit from a new visitor.” If the person has browsed your website before, the visit is categorized as “Visit from a returning visitor.” ● Found in the Audience and Traffic Sources section 2
  • A visitor is uniquely identified by a Google Analytics visitor cookie which assigns a randomvisitor ID to the user, and combines it with the timestamp of the visitor’s first visit. Thecombination of the random visitor ID and the timestamp establish a Unique ID for that visitor. ● Generally, the Visitors metric will be smaller than the Visits metric which in turn will be smaller than the Pageviews metric. ● So, if visitor A comes to your site 5 times during the selected date range and visitor B comes to your site just once, you will have 2 Visitors. Remember, a visitor is uniquely identified by a Google Analytics visitor cookie.Time Metrics ● For example, a visitor saw page A, then page B, and then left the site. ● The Time on Page for page A is calculated by subtracting the page A timestamp from the page B timestamp. ● The Time on Page for page B is 0 seconds, because there is no subsequent timestamp that Google Analytics can use to calculate the actual Time on Page.Average Time on Page, bounces are excluded from the calculation. In other words, any Timeon Page of 0 is excluded from the calculation.Average Time on Site, bounces remain a part of the calculation. ● To calculate Average Time on Site, Google Analytics divides the total time for all visits by the number of visits.Flash Based Sites ● Some sites make extensive use of Flash or other interactive technologies. ● Often, these kinds of sites don’t load new pages frequently and all the user interaction takes place on a single page. ● As a result, it’s common for sites like this to have high bounce rates and low average times on site. ● If you have such a site, you may wish to set up your tracking so that virtual pageviews or events are generated as the user performs various activities.Visit Duration categorizes visits according to the amount of time spent on the site during thevisit. Found in the Engagement section of the Visitors TabTraffic SourcesYou can compare your traffic sources against each other to find out which sources send you thehighest quality traffic. 3
  • Direct Traffic: bookmarks or typing URL directly into browser.Search Engine traffic represents visitors who click on a search results link in Google, Yahoo,or any other search engine. ● Organic: free search results ● Paid search engine traffic is pay per click or cost per click traffic that you purchase from a search engine -- for example on Google AdWords.Referring Sites include any sites that send traffic to you. These could be banner ads or linksfeatured on blogs, affiliates, or any site that links to your site.Looking at the highest traffic drivers is a start, but it doesn’t tell you whether the traffic wasqualified. In other words, did the traffic help you achieve the goals you’ve set for your site?One easy indicator of quality is Bounce Rate -- the percentage of visits in which the person leftwithout viewing any other pages.In the slide, although blogger.com sent the most traffic, it has an 88% bounce rate. A bouncerate this high suggests that the site isn’t relevant to what the visitor is looking forBy clicking the “compare to site average” icon and selecting a comparison metric, you can seewhich sources outperform and underperform the site average.So here, for example, if we select Bounce Rate as our comparison metric. we can see that thetwo most popular sources of traffic underperform the site average.One note about bounce rate, if your site is a blog, bounce rate may not be relevant. With blogs,it’s common for people to look at a single page and then leave.Looking at keywords is a very useful for understanding what visitors were expecting to find onyour site.Keywords with a high bounce rate tell you where you failed to meet that expectation.You can find out which landing pages are responsible for the poor performance and send thekeyword traffic to the most effective landing page.Be sure to also check the bounce rates for organic, non-paid keywords. This information canoffer insights into how to best focus your search engine optimization efforts.Campaign AttributionBy default, Google Analytics attributes a conversion or sale to the campaign that most recentlypreceded the conversion or sale.For example, if a visitor clicks on an AdWords ad (Campaign 1 in the first session) and thenlater returns via a referral to purchase something (Referrer 1 in the second session), the referralwill get credit for the sale. 4
  • However, if instead the visitor returns directly, then the AdWords ad (Campaign 1) will still getcredit for the sale.To prevent a specific referral or campaign from overriding a prior campaign, simply append“utm_nooverride=1” to all referring campaign links as shown in the slide. This ensures that theconversion is always attributed to the original referrer (or first campaign the user clicked on).Therefore, in the example above, the original campaign will continue to get credit for theconversion.If a visitor returns via a link without the utm_nooverride, as in the third example, that campaignwill get credit for the sale since it overwrites all previous referring campaigns.ContentThe Content Drilldown Report groups pages according to directory. You can click on adirectory to see the pages in the directory.The Landing Pages Report lists all of the pages through which people entered your site. ● You can use this report to monitor the number of bounces and the bounce rate for each landing page. ● Bounce rate is good indicator of landing page relevance and effectiveness.You can lower bounce rates by tailoring each landing page to its associated ads and referrallinks.The Navigation Summary can help you understand how people move through your site.It shows how people arrived at a specific page and where they went afterwards. Reportspageviews. ● The report is available from the Pages report. ● Percent Entrances shows how frequently the page was a landing page. ● Percent Previous Pages shows how frequently visitors came to the page after viewing another page on the site. ● Percent Exits shows how frequently visits ended on this page. ● Percent Next Pages shows how frequently visitors continued on to another page on the site. ● The list of pages that were viewed immediately before the page or pages is shown in the left column, under Previous Page Path. ● The list of pages that were viewed immediately after the page or pages is shown in the right column, under Destination Page.The Entrance Paths Report (under Landing Pages Report) is a powerful tool for analyzingnavigation paths. It reports vistor data. 5
  • ● For example, let’s say that you want to find out whether people clicked the Purchase button on your landing page and actually completed the purchase. ● To find out, go to the Landing Pages report and click Entrance Paths.FUNDAMENTALSAccount Administration“Administrators” have access to all reports and they can also modify settings. So,Administrators can create profiles, filters, and goals, and they can add users.Users only have read access to your reports and they can’t modify analytics settings. Also,“Users” can be restricted to viewing only specific profiles.A profile is a set of rules that defines the data you see for a web property. For example, youmight have web property example.com for which you have three profiles.One of the profiles might show all the data for all the traffic that comes to example.com.Another profile might use filters to only show the data for traffic to a certain subdirectory.Still another profile might use a different set of filters to show only another subset of data.To see a list of the profiles that belong to a specific web property, navigate to that web propertyfrom the Account Administration screen.Once you are on the screen for the web property, click the Profiles tab. On the Profiles tab,you’ll see a Profile selector menu that lists all the profiles.Profiles are very flexible -- they are basically just a set of rules that define what data is to beincluded in the reports. ● The other profile might be filtered so that it contains only traffic from AdWords visitors. ● In addition, you might want to give certain users access only to the filtered profile. This has the effect of only allowing these users to see AdWords traffic to example.com.But, if you are not an administrator, you’ll only see the Assets tab under the Adminstratorsettings. That’s because you need to be an admnistrator to add new profiles or to edit a profile’sgoals, users, filters, and settings.However, you don’t need to be an administrator to add or edit assets. This includes advancedsegments, annotations, and custom alerts.The Profile Settings sub-tab is where you enable e-commerce and site search reports, set yourpreferred time zone, and other settings.Campaign Tracking & AdWords Integration 6
  • Google Analytics allows you to track and analyze all of your marketing campaigns -- includingpaid search campaigns, banner ads, emails and other programs.There are two ways to track ad campaigns.For AdWords campaigns, you should enable keyword autotagging. This allows GoogleAnalytics to automatically populate your reports with detailed AdWords campaign information.In order to enable autotagging, you’ll need to link your AdWords and Google Analytics accounts.The second way to track campaigns is to manually tag links. So, for example, you could tag thelinks in an email message with campaign-identifying information. You may also choose tomanually tag AdWords links if you do not wish to enable autotagging.The tags are campaign variables that you append to your URL.By linking Google Analytics to your AdWords account, you can get advanced reporting thatmeasures performance and ROI for your AdWords campaigns. It also makes it easier for you toevaluate your Ad Words performance on a keyword by keyword basis.Your cost data -- the information about clicks and keyword spending -- will be applied once youlink your accounts. If you dont want cost data imported into a particular profile, you can edit theprofile settings and de-select the cost data option -- after youve completed the linking process.Autotagging your links is important because it helps Analytics differentiate the traffic comingfrom Google paid listings and traffic coming from Google organic listings.If autotagging is not enabled, your Analytics reports will show that the clicks from the sponsoredlistings and the organic listings are both coming from the same source: google organic.By default, Analytics considers them both to be from Google organic search results.So, enabling autotagging allows you to see which referrals to your site came from your paidGoogle campaigns and which ones came from Google organic search results.Autotagging works by adding a unique id, or g-c-l-i-d, to the end of your destination URLs.This unique id allows Analytics to track and display click details in your reports.It is important to note that 3rd party redirects and encoded URLs can prevent autotagging fromworking properly.You should test these cases by adding a unique parameter to the end of your URL --- forexample you could add ?test=test.Test to make sure that the parameter is carried through to your destination page and that thelink doesn’t break.Notice that the first query parameter is always preceded with a question mark. Subsequentvalues are separated using ampersands. 7
  • Data DiscrepanciesYou may notice differences between the data in your Google Analytics and AdWords reports.There are several reasons for these differences.First, AdWords tracks clicks, while Analytics tracks visits.Second, some visitors who click on your AdWords ads may have JavaScript, cookies, or imagesturned off. As a result, Analytics wont report these visits, but AdWords will report the click.You’ll also see differences between Analytics and AdWords if the Google Analytics TrackingCode on your landing page doesn’t execute. In this case, AdWords will report the click butAnalytics will not record the visit.Invalid clicks may also cause reporting differences because while Google AdWordsautomatically filters invalid clicks from your reports, Google Analytics will still report the visits.Examples include clicks or impressions generated by a publisher clicking on his own ads, apublisher encouraging clicks on his ads, automated clicking tools or traffic sources, robots, orother deceptive software.Finally, keep in mind that AdWords data is uploaded once a day to Analytics so the results foreach may be temporarily out of sync.Make sure that your landing pages contain the Google Analytics Tracking Code. If they don’t,campaign information will not be passed to Analytics, but clicks will register in AdWords.Make sure that you have autotagging enabled. Otherwise, visits will be marked as GoogleOrganic instead of Google CPC. While we strongly recommend that you use autotagginginstead of manual tagging, if you do manually tag your destination URLs, you must make surethat all of them are tagged, otherwise data discrepancies will occur.Be aware that campaign data can be lost if your site uses redirects. As a result, Analytics won’tshow the visits as coming from AdWords, but your AdWords report will still report the clicks.Auto-redirecting is the technique of automatically sending a site visitor to another page onces/he has landed on a page. The other page is often on the same website, but it can be on adifferent site altogether. In fact, auto-redirecting is used when a website has been set up for thesole purpose of ranking highly in the search engines. When visitors arrive at a page on the site,from a listing in the search engine results, they are automatically redirected to the main site.On-site auto-redirecting is common when a page, within the site, has been created specificallyto rank highly in the search engines, but has been so highly optimized that it is no good forpeople to actually see. Auto-redirecting takes visitors to the proper page within the site. 8
  • Both of those uses are not wanted by the search engines, and they sometimes penalise a pageor site for doing it. Fortunately, the engines are not able to automatically detect most of the auto-redirecting methods.The engines are not against auto-redirecting when it is done for they what consider to be a validreason. E.g. when you have posted a message in a forum, you often get a confirmation pagewhich will wait a few seconds and then auto-redirect you to the messages.Manual Campaign URL TaggingGoogle Analytics automatically tracks all of the referrals and search queries that send traffic toyour website.However, if you are running paid advertising campaigns, you should add tags to the destinationURLs of your ads. Adding a tag allows you to attach information about the campaign that willshow up in your Analytics reports.Although it’s possible to manually tag your AdWords ads, you should enable auto-tagginginstead.If you manually tag your AdWords ads, the AdWords reports will only show you information byCampaign and Keyword. If you enable auto-tagging, you’ll be able to see much more detail. TheAdWords reports will show you results by ad group, matched search query, placement domainand many other AdWords attributes.There are five variables you can use when tagging URLs. To tag a URL, you add a questionmark to the end of the URL, followed by your tag or query string, as shown in the slide.The variables and values are listed as pairs separated by an equals sign. Each variable-valuepair is separated by an ampersand.Let’s look at each variable. ● utm_source to identify the specific website or publication that is sending the traffic. ● utm_medium to identify the kind of advertising medium -- for example, cpc for cost per click, or email for an email newsletter. How the message is delivered to the consumer. ● utm_campaign to identify the name of the campaign -- for example, this could be the product name or it might be a slogan. Used to group several marketing mediums together. ● utm_content specifies the version of the ad. For example, if you have two call-to-action links within the same email message, you can use utm_content to differentiate them so that you can tell which version is most effective. ● utm_term specifies the search term bought.You should always use these three variables when tagging a link. You can use them in anyorder you want. 9
  • Example: http://mysite.com/?utm_source=yoursite&utm_medium=banner&utm_campaign=summerpromotLet’s look at a destination URL from an AdWords ad.In the first example, no tag has been provided and autotagging is disabled. In this case, youwon’t see this traffic in your AdWords reports. ● Example: http://www.mysite.comThe second example shows how to manually tag an AdWords link. This traffic will show up inyour AdWords reports, but information will be limited to campaign and keyword.You must specify cpc as your medium and google as your source in order to see this traffic inyour AdWords reports. You should also specify cpc as your medium when tagging paid searchcampaigns from other search engines. ● Example: http://mysite.com/? utm_source=google&utm_medium=cpc&utm_campaign=summerpromo&utm_term=myk eywordThe third example shows what an AdWords autotagged URL might look like once AdWords hasappended the g-c-l-i-d variable to the end of the URL ● Example: http://mysite.com/?gclid=123xyzYou can select any of these variables as a dimension in most reports.For example, to see all of the sources in California from which you received traffic, you could goto the Map Overlay report, drill down to California, and select Source as a dimension.You can use the URL Builder in the Google Analytics Help Center to construct your URLs.You enter in the destination URL and the values for each campaign variable. You should alwaysuse source, medium and campaign name.The URL Builder can be found via the link displayed here on the slide, or you can search for“URL Builder” in the Analytics Help Center.The URL builder can only construct one URL at a time, so you probably won’t want to use it toconstruct every URL for every campaign.If you have a large number of URLs to tag, you can use spreadsheets to automate the process.Generate a sample URL in the URL Builder and create a simple spreadsheet formula.Spreadsheets can make it much easier to generate thousands of tagged URLs.When someone clicks on a tagged link Google Analytics, using the urchin.js JavaScript, storesall the values in a cookie on the visitor’s machine.Stick to these best practices when tagging your advertising campaigns. 10
  • ● If you use AdWords, be sure to enable auto-tagging. Otherwise, you’ll miss out on important information that can help you optimize your AdWords campaigns. ● Second, for each campaign, use the URL Builder to create a template URL. Then, copy and paste from the template to create the rest of the URLs for the campaign. ● Third, use consistent names and spellings for all your campaign values so that they are recorded consistently within your Analytics reports ● Finally, use only the campaign variables you need. You should always use source, medium, and campaign name, but term and content are optional.Difference b/w campaigns and referrals is that campaigns are tagged.Visitor campaign information is stored in a cookie on the visitor’s machine. This cookie storesthe referral information for the visitor’s session. This cookie tracks organic referrals, taggedcampaign links, un-tagged referral links and direct visits.Each time a visitor visits your site the Google Analytics Tracking code updates this cookie withthe appropriate campaign information. When the cookie is updated GA discards the previouscampaign information. As a result GA only tracks the current campaign information, not previouscampaign information. ● Direct traffic is always overwritten by referrals, organic and tagged campaigns ● New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookieHere’s an example. A visitor visits your site from a newsletter with tagged links. They lookaround and decide to leave. When they leave your site the campaign tracking cookie will persistand indicate that they originated from the newsletter.The same visitor decides to come back the next day and types your URL into the browser. Thecampaign cookie will still indicate that the visitor arrived via your newsletter because the secondvisit was a direct visit, and direct traffic does not overwrite existing campaign information.Analysis Focus-Ad WordsVisits: #of visitsImpressions: number of times your ads were displayed.Clicks: Shows the number of clicks for which you paid and which your ads received.If there are fewer visits than clicks,• Some visitors may have clicked away from the website• Landing page stopped loading before the tracking code was executed• Landing pages may be missing the GA tracking code• Visitors may not have Javascript, images and cookies enabled in their browsers 11
  • Often you will have fewer clicks then visits. The reason is that some visitors clicked on the adand then later during a different session returned directly to the site through a bookmark. Thereferral information from the original visit was retained so some clicks resulted in multiple visits.Impressions, clicks, costs and CTR (click through rate) all relate to how many times your adswere displayed and how frequently people clicked on them. These metrics can help youunderstand how visible and compelling your ads are to searchers on these keywords. Forexample, if you want a higher click through rate, you might consider bidding for a higher positionor rewriting your ads so that its more relevant to the searcher. If you are getting all zeroes in thecost column, make sure you’ve linked your AdWords account and that your enabled autotagging.Revenue per click, ROI, and margin can help you assess keyword profitability. For example,ROI is useful b/c it provides a single metric comparison of how much you spent vs. how muchyou made.An ROI of 0% means that you earned in revenue the same amount of money that you spent. AnROI of 100% means that you spent ‘x’ and received ‘2x’ in revenue. If your RPC numbers areall zero and your ROI numbers are all minus 100% its b/c you have zero revenue so make surethat you have set goal values or that you’ve enabled e-commerce tracking.Before you delete or pause negative ROI keywords, consider whether you have enough datayet to make a decision. In particular, watch out for short date ranges. It’s generally not a goodidea to make keyword changes on the basis of a few days worth of data. Consider returncustomers, those that find the site via an AdWords ad and then return later to buy again. You’llmiss repeat conversions if you set too short of a date range. Also, it may take days or longer formany visitors to become customers so set a date range that is at least as long as your expectedsales cycle.ReportsAdWords Campaigns ReportOrganizes your data according to campaign, ad group, and keyword. Click a campaign and youdrill down to the ad groups. Click one of the ad groups and you drill down to the keywords in thead group. The same metrics are available at every level of the report but you can also organizeyour data according to a variety of AdWords dimensions, just select the AdWords dimensionsyou want from the drop down menu. This is powerful b/c you can drill down to a subset of yourdata and then break it out according to any AdWords dimension. In this case we have alreadydrilled down to an ad group within a campaign. Now by selecting match type we can see howdifferent match types perform for this ad group. One thing to be aware of if you manually tag thedestination URLs for your keywords you will only be able to see your data by campaign and 12
  • keyword but as long as you have enabled autotagging you can see your data any of theAdWords dimensions. Let’s look at another report.Day Parts ReportTo find out which times of day your campaigns are most effective, navigate to the Day Partsreport. Now graph visits against transactions and view the data hourly. Here transactionsincrease relative to the visits at noon, 2PM, 4PM, 8PM and 11PM so we might want to increaseour bids at those times. You can also use the table to drill down to a specific hour and then aspecific day for that hour and then look at which keywords drove transactions for that hour andday. Here we can see that the keyword ‘Google Store’ drive all the revenue for noon onThursdays.Destination URL ReportThe destination URL report shows each destination URL on your site that received AdWordstraffic. Click one of the destination URLs then select ad content for the AdWords dimensionsdrop down. Now you can see which ad headlines performed best for this particulardestination URL.Overview ReportThe overview report provides shortcut links to commonly needed analyses. For example, youcan find out the actual search queries that drove visits to your site.Placements ReportTo find out which placements work best for you, you can click the link on the overview ornavigate to the placement reports and you can drill down into your placements to find thespecific URLs that work best.Keyword Positions ReportYou can use the keywords position report to find out how ad position affected your keywordsperformance. Select a keyword on the left side and then select a metric like “average time onsite”. The “Side 1” position for this keyword referred visitors who spent an avg of almost 5minutes on the site. The “Side 2” position referrred visitors who spent an average of 2.5 minuteson the site.TV Ads ReportFinally you can upload your TV ad, a video file, to your AdWords account and start a campaignon nationwide TV. You specify the time of day and week, audience demographic and type of 13
  • program you would like to target. Then you can track it using the TV campaigns report. You candrill down into the specific TV campaigns and see the impressions delivered, # of ad airings,cost, and CPM alongside your metrics like visits, time on site and conversions. For example,this screenshot shows website visits plotted against impressions delivered, the number of activeTVs tuned to your commercial. Looking at your web traffic metrics alongside your TV campaignmetrics can help you optimize your TV campaign.If youre tagging paid CPC campaigns, you should also use utm_term to specify the keyword.And, you can differentiate versions of a link -- for example, if you have two call-to-action linkswithin the same email message, you can use utm_content to differentiate them so that you cantell which version is most effective.GoalsDefining site goals and tracking goal conversions is one of the best ways to assess how wellyour site meets its business objectives. You should always try to define at least one goal for awebsite.So what is a goal? In Google Analytics, a goal represents an activity or a level of interaction withyour website that’s important to the success of your business.Some examples of goals are an account signup, a request for a sales call, or even that thevisitor spent a certain amount of time on the website.There are four types of goals in Google Analytics.A URL Destination goal is a page that visitors see once they have completed an activity. Foran account sign-up, this might be the “Thank You for signing up” page. For a purchase, thismight be the receipt page. A URL Destination goal triggers a conversion when a visitor viewsthe page youve specified.A Time on Site goal is a time threshold that you define. When a visitor spends more or lesstime on your site than the threshold you specify, a conversion is triggered.A Pages per Visit goal allows you to define a pages viewed threshold. When a visitor viewsmore pages --or fewer pages --than the threshold youve set, a conversion is triggered.An Event goal allows you to attach a conversion to an event that you have defined. We’ll learnabout events in a subsequent lesson.You can see total conversions and conversion rates for each of your goals in your reports. 14
  • For each URL Destination goal that you define, you can also define a funnel. A funnel is the setof steps, or pages, that you expect visitors to visit on their way to complete the conversion. Asales checkout process is a good example of a funnel. And the page where the visitor enterscredit card information is an example of one of the funnel steps. So, the goal page signals theend of the activity -- such as a “thank you” or “confirmation” page -- and the funnel steps are thepages that visitors encounter on their way to the goal. Defining a funnel is valuable because itallows you to see where visitors enter and exit the conversion process. For example, if younotice that many of your visitors never go further than the “Enter shipping information” page, youmight focus on redesigning that page so that it’s simpler. Knowing which steps in the processlose would-be customers allows you to eliminate bottlenecks and create a more efficientconversion path.To set up a goal, first go the Account Administration page. Click the account and web propertyfor which you want to configure a goal.Select the profile to which you want to add the goal.Then, click the goals tab and click the plus-Goal link in one of the Goal sets.You can create up to 4 sets of 5 goals each.URL Destination GoalTo define a URL Destination Goal, select URL Destination as the goal type. Next, enter the URLof the goal page. You don’t have to enter the entire URL. You can simply enter the request URI- that’s what comes after the domain or hostname.So, if the complete URL is www.googlestore.com/confirmation.php, you only need to enter/confirmation.php.Make sure that the URL you enter corresponds to a page that the visitor will only see once theycomplete the conversion activity. So, pick something like the Thank You page or a confirmationpage for your goal.You can also enter a name for the Goal -- here we’ve entered “Completed Order”. This namewill appear in your conversion reports.Defining a funnel is optional. To define your funnel steps, you add the URLs of the pagesleading up to the goal URL. Just as with goals, you don’t have to enter the entire URL of afunnel step -- just the request URI is fine.Provide a name for each step in the funnel -- here we’ve entered “Select gift card “ for Step 1.The names you enter will appear in your reports.Match TypeThe match type defines how Google Analytics identifies a goal or funnel step. You have threechoices for the Match Type option. 15
  • • “Head Match” is the default. It indicates that the URL of the page visited must match what you enter for the Goal URL, but if there is any additional data at the end of their URL then the goal will still be counted. For example, some websites append a product ID or a visitor ID or some other parameter to the end of the URL. Head Match will ignore these. • Here’s another example, illustrated on this slide: If you want every page in a subdirectory to be counted as a goal, then you could enter the subdirectory as the goal and select Head Match.• “Exact Match” means that the URL of the page visited must exactly match what you enter for the Goal URL. In contrast to Head Match, which can be used to match every page in a subdirectory, Exact Match can only be used to match one single page. Also notice that Exact Match does not match the second pageview, “/offer1/signup.html?query=hats” because of the extra query parameter at the end.• “Regular Expression Match” gives you the most flexibility. For example, if you want to count any sign-up page as a goal, and sign-up pages can occur in various subdirectories, you can create a regular expression that will match any sign-up page in any subdirectory. Regular Expressions will be covered in a later module. • When you use Regular Expression Match, the value you enter as the goal URL as well as each of the funnel steps will be read as a Regular Expression.Remember that regardless of which option you choose, Google Analytics is only matchingRequest URIs. In other words, the domain name is ignored.Check “Case Sensitive” if you want the URLs you entered into your goal and funnel to exactlymatch the capitalization of visited URLs.Time on SiteTo define a Time on Site goal, select Time on Site as the goal type. Next, select "Greater than"or "Less than" and enter an amount of time, for example 15 minutes. Well discuss goal valueshortly.Pages Per VisitTo define a Pages per Visit goal, select Pages per Visit as the goal type. Next, select "Greaterthan", "Equal to", or "Less than" and enter a number of pages.Threshold goals are useful for measuring site engagement, whereas URL Destination goals arebest for measuring how frequently a specific activity has been completed. If your objective is forvisitors to view as much content as possible, you might set a Pages per Visit goal. Or, if youhave a customer support site and your objective is for visitors to get the information they need inas short a time as possible, you might set a Time on Site goal with a "Less than" condition.The “Goal Value” field allows you to specify a monetary value for goal. You should only do thisfor non-ecommerce goals. 16
  • By setting a goal value, you make it possible for Google Analytics to calculate metrics likeaverage per-visit-value and ROI. These metrics will help you measure the monetary value of anon-ecommerce site.Just think about how much each goal conversion is worth to your business. So, for example, ifyour sales team can close sales on 10% of the people who request to be contacted via yoursite, and your average transaction is $500, you might assign $50 or 10% of $500 to your"Contact Me" goal.Again, to avoid inflating revenue results, you should only provide values for non-ecommercegoals.There is an important difference between goal conversions and e-commerce transactions.A goal conversion can only happen once during a visit, but an e-commerce transaction canoccur multiple times during a visit.Let’s say that you set one of your goals to be a PDF download and you define it such that anyPDF download is a valid goal conversion. And let’s say that the goal is worth $5.In this case, if a visitor comes to your site and downloads 5 PDF files during a single session,you’ll only get one conversion worth $5. However, if you were to track each of these downloadsas a $5 e-commerce transaction, you would see 5 transactions and $25 in e-commercerevenue.You’ll learn how to set up ecommerce tracking and how to track PDF downloads in latermodules.If you are using a filter that manipulates the Request URI, make sure that your URL Destinationgoal is defined so that it reflects the changed Request URI field. For example, in the slide, wehave a profile that defines /thankyou.html as a URL Destination goal. But we have anotherprofile with a filter that appends the hostname to the Request URI. So, for this profile, we needto change the goal definition accordingly.If you define a funnel for a goal, Google Analytics populates the Funnel Visualization report,shown here in the slide.On the left, you can see how visitors enter your funnel. On the right, you can see where theyleave the funnel and where they go.The middle shows you how visitors progress through the funnel -- how many of them continueon to each step.In this example, we can see that there were 9,283 entrances at the top of the funnel and 187completed orders, at the bottom of the funnel. 17
  • This report is very useful for identifying the pages from which visitors abandon your conversionfunnel.Reverse Goal Path ReportHere’s another report in the Goals section. It’s the Reverse Goal Path report. You can see thisdata even if you haven’t defined a funnel. It lists the navigation paths that visitors took to arriveat a goal page and shows you the number of conversions that resulted from each path.In this example, we can see that 97 of the conversions resulted from the first navigation paththat’s shown.This is a great report for identifying funnels that you hadn’t considered before and it can giveyou great ideas for designing a more effective site.FiltersGoogle Analytics filters provide you with an extremely flexible way of defining what data isincluded in your reports and how it appears.You can use them to customize your reports so that data that you deem useful is highlighted ininteresting ways. Filters can also help you clean up your data so that it is easier to read.There are two types of filters in Google Analytics – predefined filters and custom filters.Filters process your raw traffic data based on the filter specifications. The filtered data is thensent to the respective profile.Once data has been passed through a filter, Google cannot re-process the raw data.That’s why we always recommend that you maintain one unfiltered profile so that you alwayshave access to all of your data.To set up a goal, first go the Account Administration page. Click your desired account. You canuse the Filters tab to create new filters, edit their settings, and apply them to profiles. To createa new filter you will need to complete several fields, including the filter name and type. If youelect to create a custom filter, you will need to complete several additional fields.Google Analytics provides three commonly used predefined filters.The first filter called “Exclude traffic from domains” excludes traffic from the domain that youspecify in the Domainfield. If you apply this filter, Google Analytics will apply a reverse lookupwith each visitor’s IP address to determine if the visitor is coming in from a domain that shouldbe filtered out. Domains usually represent the ISP of your visitor although larger companiesgenerally have their IP addresses mapped to their domain name.The second filter, “Exclude traffic from IP addresses”, removes traffic from addresses enteredinto the IP address field. This filter is generally used to exclude your internal company traffic. 18
  • The third filter, “Include traffic subdirectories”, causes your profile to only report traffic to aspecified directory on your site. This is typically used on a profile that is created to track one partof a website.As a best practice, we recommend that you create a filter to exclude your internal companytraffic from your reports.To do this you can use the predefined filter “Exclude traffic from IP addresses”. You will need toenter your IP address or range of addresses into the ‘IP address” field.In addition to the pre-defined filters that Analytics offers, you can also create custom filters.Custom filters offer you greater control over what data appears in your profiles.To create a custom filter, select “Custom filter”. Additional fields will appear when you choosethis option.Each custom filter has three main parts. ● Filter Types: There are six filter types available and each one serves a specific purpose. We’ll look at these in a minute. ● Filter Field: There are numerous fields you can use to create your filter. Examples of some commonly used fields are the “Request URI” and “Visitor Country” fields. The complete list of fields can be found through the link shown here or you can search for “filter fields” in the Analytics Help Center. ● Filter Pattern: This is the text string that is used to attempt to match pageview data. The pattern that you provide is applied to the field and, if it matches any part of the field, it returns a positive result and causes an action to occur. You’ll need to use POSIX Regular Expressions to create the filter pattern. Learn more in the module on Regular Expressions.Here’s a chart that describes the filter types. ● Exclude and Include Filters are the most common types. They allow you to segment your data in many different ways. They’re frequently used to filter out or filter in traffic from a particular state or country. ● Lowercase and Uppercase Filters do not require a filter pattern, only a filter field. It converts the field into all lowercase and uppercase letters. Lowercase and Uppercase filters are very useful for consolidating line items in a report. Let’s say, for example, that you see multiple entries in your reports for a keyword or a URL, and the only difference between the multiple entries is that sometimes the URL or keyword appears with a different combination of uppercase and lowercase letters. You can use the Lowercase and Uppercase filters to consolidate these multiple entries into a single entry. 19
  • ● Search and Replace Filters replace one piece of data with another. They are often used to replace long URL strings with a shorter string that is easier to read and identify in your reports. ● Advanced Filters remove unnecessary data, replace one field with another, or combine elements from multiple filter fields. For example, a best practice when tracking multiple subdomains in a single profile is to append the subdomain name to the page names. You can do this by creating an advanced filter that appends Hostname to Request URI.Here’s an example of how you might use a Search and Replace filter. Let’s say that yourwebsite uses category IDs as an organizational structure. So, in your Pages report, you’d see alist of Request URIs that indicate the different pages on your site.The page “/category.asp?catid=5” is actually the Google Store Wearables page. You couldmake the Pages report more meaningful by replacing “catid=5” with a descriptive word, like“Wearables”.Here’s what the Search and Replace filter might look like. This particular filter would overwritethe entire Request URI with “Wearables.”This is a simplified example to give you an idea of how you can use filters.Using Filters & ProfilesOnce you’ve defined a filter, you can apply it to a single profile or across several profiles.So, for example, in the slide, the graphic shows a single web property with two profiles.Filter 1 has been applied to both profiles.Filter 2 has been applied only to Profile 2.By setting up multiple profiles and applying filters creatively to each of them, you have a greatdeal of reporting and analysis flexibility.You can also use profiles and filters together to create customized data views.Let’s say that you want to have two different views of your data -- one view includes only trafficto a subdomain and the other view only includes customers from a specific geographic region.To do this, you’d set up Profile 2 and Profile 3 as shown here in the chart.Or, for example, you might want to set up a profile that only includes Google AdWords traffic.We’ll look at how to do this in the next slide. Remember, you always want to maintain a profilethat contains all of your data. That’s Profile 1 in the chart.To set up a profile that includes only Google AdWords traffic, you need to apply the two CustomInclude filters shown in the slide.In filter one, you’ll filter on campaign source for a pattern of google.In filter two, you’ll filter on campaign medium for a pattern of cpc.You can apply these two filters in any order. 20
  • Let’s look at how you can use profiles and filters to track subdomains.If your subdomains are totally separate businesses, and you have no need for reports thatinclude cumulative traffic to both, then you could simply create a unique web property for eachsubdomain.Google Analytics creates a unique web property ID for each web property you set up.The web property ID comprises the letters “U” “A”, followed by the account ID, followed byanother number that distinguishes the web property from other web properties in the account.In the slide example, web property 1 is distinguished by a dash 1. Web property 2 isdistinguished by a dash 2.So, you’d install the “dash 1” version of your tracking code on your Subdomain A pages, and the“dash 2” version of your tracking code on your Subdomain B pages.But what if you want to analyze the traffic aggregated across both subdomains? In this case,you could set up 3 duplicate profiles under a single web property.Then, you’d apply an Include filter to two of the profiles.Profile 1 includes all traffic to both subdomains.Profile 2 only includes traffic to subdomain A.Profile 3 only includes traffic to subdomain B.In this scenario, you’d install identical tracking code on every page of the site regardless ofsubdomain.When setting up profiles and filters for your Analytics account, you should always create oneunfiltered profile that can be a back-up in case your filters do not function as planned or youneed more data than you originally thought.Remember, once your raw data has passed through filters, Google cannot go back andreprocess the data. So, maintaining an unfiltered profile provides you with a backup.You can apply multiple include and exclude filters to a single profile, but keep in mind that whenmore than one filter is applied, the filters will be executed in the same order that they are listedin your Profile Settings.In other words, the output from one filter is then used as the input for the next filter.The example shown here illustrates that if you want to include only users from California andTexas, you cannot create two separate include filters because they will cancel each other out.The solution is to create one filter that uses a regular expression to indicate that the VisitorRegion should be California or Texas.If you drive traffic from AdWords to multiple sites, each of which is tracked in a separateAnalytics profile, you’ll need to apply a filter to each site’s profile.Because, when you apply cost data from an AdWords account, data from the entire account isapplied to each profile - Google Analytics doesn’t automatically match campaigns to specificprofiles. 21
  • To illustrate what would happen if you don’t apply a filter, let’s imagine that you have two sitesand you spend $50 to drive traffic to each of them.Without a filter, the Clicks tab on each profile would include $100 worth of cost data instead ofjust the $50 you spent for that site.So, for each profile that should include a subset of your AdWords data, you’ll need to create acustom include filter.Create a custom filter and select the Include filter type.For the filter field, select “Campaign Target URL”. This field only applies to Google AdWordsdata.Use a regular expression to create the filter pattern based on the AdWords destination URL thatis applicable to this profile.Once you’ve saved this filter, only AdWords data for this profile will be displayed in the reports.Regular ExpressionA regular expression is a set of characters and metacharacters that are used to match text in aspecified pattern.You can use regular expressions to configure flexible goals and powerful filters.For example, if you want to create a filter that filters out a range of IP addresses, you’ll need toenter a string that describes the range of the IP addresses that you want excluded from yourtraffic.Let’s start off by looking at each metacharacter.Metacharacters are characters that have special meanings in regular expressions.Dot: wildcard to match any single character. ● Example: “Act ., Scene 3” would match “Act 1, Scene 3” and “Act 2, Scene 3” ● The operative word here is “single”, as the regex would NOT match Act 10, Scene 3. The dot only allows one character, and the number ten contains two characters -- a 1 and a 0. ● You could use two dots to write a regular expression that would match “Act 10, Scene 3”. ● To make your regex more flexible, and match EITHER “Act 1, Scene 3” or “Act 10, Scene 3”, you could use a quantifier like the + sign. 22
  • Backslashes allow you to use special characters, such as the dot, as though they were literalcharacters. Enter the backslash immediately before each metacharacter you would like toescape. ● “U.S. Holiday” written this way with periods after the U and the S would match a number of unintended strings, including UPS. Holiday, U.Sb Holiday, and U3Sg Holiday. ● Remember that the dot is a special character that matches with any single character, so if you want to treat a dot like a regular dot, you have to escape it with the backslash. ● U.S. Holiday matches only the U.S. Holiday. ● You’ll use backslashes a lot, because dots are used so frequently in precisely the strings you are trying to match, like URLs and IP addresses. ● For example, if you are creating a filter to exclude an IP address, remember to escape the dots. ● For 192.168.1.1 would need to be written as 192.168.1.1Use square brackets to enclose all of the characters you want as match possibilities. So, in theslide, you’re trying to match the string U.S. Holiday, regardless of whether the U and the S arecapitalized. ● [uU].[sS]. Holiday matches u.s. Holiday and U.S. Holiday ● However, the expression won’t match U.S. Holiday unless periods are used after both the U and the S. The expression also requires that the H is capitalized. ● There is a regex you can write to match all of these variations. The question mark used here is another “quantifier”, like the ‘+’ sign mentioned earlier. ● [uU].?[sS].?[hH]oliday will match US Holiday or u.s. holiday. ● You can either individually list all the characters you want to match, as we did in the first example, or you can specify a range. ○ Use a hyphen inside a character set to specify a range. So instead of typing square bracket 0 1 2 3 4 5 6 7 8 9, you can type square bracket 0-9. ● And, you can negate a match using a caret after the opening square bracket. ○ Typing square bracket caret zero dash nine will exclude all numbers from matching. [^0-9] does not match 0-9. [0-9] matches 0-9.The use of the caret shown here is specific to character sets, and the negating behaviouroccurs only when the caret is used after the opening square bracket in a character set.Now let’s talk about using quantifiers to indicate repetition.In earlier examples, we’ve used the plus sign and the question mark. ● The question mark requires either zero or one of the preceding character. In the expression “3-1-?” , the preceding character is a 1. So, both 3 and 3-1 would match. There will only be two possible options. ● The plus sign requires at least one of the preceding character. So, “3-1-+” wouldn’t match just a 3. It would match 3-1, 3-1-1, 3-1-1-1, and so on. 23
  • ● The asterisk requires zero or more of the preceding character. In the expression, “3-1- *”, the preceding character is a 1. So it would match 3, 3-1-, 3-1-1, 3-1-1-1 and so forth.You can also SPECIFY repetition using a minimum and maximum number inside curly brackets. ● 3-1-{2} matches 3-1-1. It does not match 3, 3-1, or 3-1-1-1. ● 3-1-{1,3} matches 3-1, 3-1-1, 3-1-1-1. It does not match 3 or 3-1-1-1-1.Recall that a dot matches any single character. What would you use to match a wildcard ofindeterminate length?Dot star will match a string of any size. Dot star is an easy way to say “match anything,” and iscommonly used in Google Analytics goals and filters.It is handy to use the parentheses and the pipe symbol (also known as the OR symbol)together.Basically, you can just list the strings you want to match, separating each string with a pipesymbol -- and enclosing the whole list in parentheses.Here, we’ve listed four variations of “US” that we’ll accept as a match for US Holiday. ● (U.S. | u.s. | US | us) Holiday matches “US Holiday” “U.S. Holiday” “u.s. Holiday” and “us Holiday” ● This will not match “U.S Holiday” b/c it was not one of our options. ● Use (u.?s.? | U.?S.?) will match all of the above.If it’s not in the list, it won’t get matched. That’s why “US Holiday” won’t get matched if one ofthe periods is missing.In our list, we’ve accounted for both periods missing, but not for just one period missing.Using question marks, the second regex in the slide will match all of the above.Anchors ● ^ Start of a String ● $ End of a StringThe caret signals the beginning of an expression. In order to match, the string must BEGIN withwhat the regex specifies..The dollar sign says, if there are any more characters after the END of this string, then it’s not amatch.So, ^US means start with US. “US Holiday” matches, but “Next Monday is a US Holiday” doesnot match.Holiday$ means end with Holiday. US Holiday still matches, but “US Holiday Schedule” doesnot match.Anchors can be useful when specifying an IP address. Take a look at these examples. 24
  • ● 192.168.1.1$ matches “192.168.1.1” but not “192.168.1.15” ● *72.168.1.1 matches “72.168.1.1” but not “172.168.1.1”Some character classes are used so commonly that there is a shorthand you can use instead ofwriting out the ranges within square brackets.Let’s look at the example of a simplified regex that could match an address: ● Backslash d (d) means match any one digit zero through nine. ● Use curly brackets and a minimum and maximum number to specify how many digits to match. ● Backslash d followed by 1 comma 5 in curly brackets means that the address must contain at least one digit, and at most five digits. ● Backslash s (s) means that the number should be followed by one space, ● Backslash w (w*) means match any alphanumeric character and the star means include as many alphanumeric characters as you want (does not include spaces)Example: d{1,5}sw*“345 Embarcadero” matches, but just “Embarcadero” does not, because this regex requires thestring to start with a number.If you want to make the number optional, group the first part of the regex with parentheses--including the space--and follow it with the question mark.Example: (d{1,5}s)?w*Note that an address like “1600 Amphitheatre Parkway” would not match either, because theregex does not account for the space between Amphitheatre and Parkway.The slide shows one way you could account for this.Example: d{1,5}sw*sw*Regex ReviewLet’s review.[ ]: Matches Characters| : Either or( ): Groups StatementsIn the example on the slide, we’ve created an expression that will match the strings Google orYahoo, regardless of whether or not Google and Yahoo are capitalized.Example: ([gG]oogle | [yY]ahoo)Here, we’ve created an expression that will match URLs for internet and theatrical movietrailers. The first part of the expression indicates that the URL can begin with anything. Then theexpression specifies that the URL must end with index.php?dl=video/trailers/ and then eitherinternet or theatrical. The $ sign ensures that any URLs that are any longer than this won’t getincluded in the match. 25
  • Example: .*index.php?dl=video/trailers/(internet|theatrical)$[ ]: Matches Characters| : Either or( ): Groups Statements. : Matches Any Single Character* : Matches Zero or More Characters :Escape$: End of a StringYou’ll find lots of applications for regular expressions in Google Analytics.Some common examples are:• filtering out internal traffic by specifying a set of IP addresses. The following would be entere -205.172.23[2345]• setting up a goal that needs to match multiple URLs. The following would be entered in theGoal URL Field when creating a new goal .*index.php?dl=video/trailers/(internet|theatrical)$• tracking equivalent pages in a funnel /downloads/casestudy/.*• and using the filter box that appears on your reports to find specific entries in a table. Thiswould be entered under the Filter Pattern field. ([gG]oogle | [yY]ahoo)Here’s how you might use regular expressions to group pages or funnel steps on your site.Using a regular expression allows you to track them as one funnel step rather than trackingeach page or action individually. If your site has multiple pages or steps that equivalent in value(e.g. whitepaper or case study downloads) you can use RegEx to group them. RegEx allow youto create one funnel as opposed to tracking each page or individually.Learn how goals and funnels work in the module on goals.And, here’s an example of using regular expressions within your reports. We’re using theSearch filter to display all the rows in the table that contain Google or Yahoo.Google Analytics provides a tool that makes it easier to generate a regular expression thatmatches a range of IP addresses.It’s called the Regular Expression Generator and you can find it at the URL shown in the slide.Or, you can search for Regular Expression Generator in the Google Analytics Help Center.You’ll find a number of useful applications for regex as you use Google Analytics.But, it’s important that you think through all the implications of each expression that you usewhen you set up a filter or a goal. 26
  • It’s easy to make a mistake and not get the data or the result you’re looking for.Set up a duplicate profile to test your regex statements. After enough data has been collected,check your results and make sure they’re what you expect.Remember to always maintain a backup profile that includes all your data.There are lots of regex resources on the web. To get started, just search for regex.Using filters to include/exclude traffic to specific sections or pages will not mimic your advancedfilters. The reason for the differences is that your filters are pageview based and the advancedsegments are visit based. For example, when you exclude traffic to a specific directory you areremoving any pageviews of just those pages. If a visitor that visited the filtered directory alsovisited other pages on your site durng their visit, then their visit will still be counted as well asthe pageviews of those other sections. However, when you use advanced filters to excludepages, you are not just excluding those pageviews, but you are excluding ALL the pageviews ofevery page for visits that saw your excluded pages during their visit. This is the reason that thevisit and pageview number using advanced segments is lower than your profile/filter method.CookiesSome web sites store information about you or your computer in a small text file called a cookie.The cookie is stored on your hard drive.Sites that run Google Analytics issue first party cookies that allow the site to uniquely, butanonymously, identify individual visitors.So, when a visitor returns to a site that runs Google Analytics, the site is able to remember thatthe visitor has been to the site before and Google Analytics will only count that visitor once inunique visitor calculations.There are two types of cookies. First-party cookies are set by the domain being visited. Onlythe web site that created a first-party cookie can read it. This is the kind of cookie used forGoogle Analytics tracking.Third-party cookies are set by third party sites -- basically sites other than the site beingvisited.Users can choose whether to allow some, none, or all types of cookies to be set on theircomputers.However, if a user does not allow cookies at all, they may not be able to view some Web sitesor take advantage of customization features.Cookies can be set with or without an expiration date. This detail is important in order tounderstand how Google Analytics tracks visits and unique visitors. 27
  • Persistent cookies have an expiration date, and remain on your computer even when you closeyour browser or shut down. On return visits, persistent cookies can be read by the web site thatcreated them.Temporary cookies do not have an expiration date, as they are only stored for the duration ofyour current browser session. As soon as you quit your browser, temporary cookies aredestroyed.While it’s impossible to determine the exact number of web visitors who have cookies enabledor disabled, available statistics suggest that the vast majority of visitors enable cookies.Many kinds of sites require that visitors have cookies enabled.For example, you need to have cookies enabled in order to login to many online shopping cartsand to use web mail.First party cookies, which are the kind used for Google Analytics, are allowed by a majority ofvisitors.Cookie tracking makes it possible to correlate shopping cart transactions with search campaigninformation, and perform other visitor analysis.Remember -- websites only have access to the information that you provide. Websites can’t getyour email address or access to any information on your computer unless you provide it. Andsince Google Analytics only uses first party cookies, Google Analytics cookies can only be readby the website that created them.Google Analytics sets the five first-party cookies shown in the slide. 1. _utma: Visitor Identifier (Expires after two years) 2. _utmb: Session Identifier (Expires after 30 minutes of inactivity) 3. _utmc: Session Identifier (Temporary cookie; destroyed when you quit the browser) 4. _utmz: Campaign Values (Expires after six months) 5. _utmv: Visitor Segmentation (Expires after two years)The __utmv cookie is optional, and will only be set if the _setVar() method is called. You willlearn about _setVar() in the module on Custom Visitor Segmentation.All of the Google Analytics cookies are persistent except for one. The __utmc cookie is atemporary cookie that is destroyed when the visitor quits the browser.Each of the other Google Analytics cookies has an expiration date set in the future, meaningthat the cookie will persist on the user’s computer until it expires, or until the user deletes it fromtheir computer.Here’s an example of the cookies set by the Google Store. You can see that __utma, __utmb,__utmc, and __utmz have been set. We’ll learn more about each cookie shortly. 28
  • First, let’s try a brief experiment. Which of the sites that you’ve visited are using GoogleAnalytics?To find out, open your browser’s cookie window. You’ll usually find it under your browser’s“Options” or “Preferences”.Now, in the cookies window, search for underscore underscore u-t-m. You should see all thedifferent Google Analytics cookies set by all the sites that you’ve visited that use GoogleAnalytics.All cookies are browser-specific. So, if you’ve already been to a site, but you open a differentbrowser to visit that site again, another set of Google Analytics cookies will be set.Now, before we continue, search for the Google Store cookies by typing the domain name“googlestore.com” into the Cookies search box.If you’ve never visited the Google Store, go to googlestore.com now so that cookies arecreated.Select the Google Store __utma cookie. In the cookie information, note the “Content” andexpiration date for the cookie._utma - Visitor Identifierutma=171169442 255036238 1115176675 1115176675 115176675 1The first number in the content of every Google Analytics cookie is called the “domain hash.” Itrepresents the domain that you visited and that set these cookies. Google Analytics applies analgorithm to the domain and outputs a unique numeric code that represents the domain. EachGoogle Analytics cookie set by the domain will begin with this number.The next number is a random unique ID.The three subsequent numbers are timestamps. They represent the time of the initial visit, thebeginning of your previous session, and the beginning of your current session. The timestampsrepresent the number of seconds since January 1, 1970.Notice that the last three timestamps are the same. What does this tell you?The last number, the session counter, can give you the answer. The last number tells you thenumber of times you have visited this site. This number will increment each time you visit thesite. The session counter here is “1”, and the last three timestamps are all the same becausethis is your first visit to the site.The random unique ID combined with the first timestamp make up the visitor ID that GoogleAnalytics uses to identify unique visitors to the site. These details allow Google Analytics tocalculate the number of unique visitors and number of visits. 29
  • Look at your Google Store __utma cookie.How many times have you visited the Google Store? If you think you’ve visited more times thanis indicated by the cookie, remember that the cookie only includes the number of times youvisited from this computer using this browser.Also, if you have cleared your cookies at some point, it is only counting from the last time youcleared your cookies.When does this cookie expire? You should see that the date is two years from last the time youvisited.The __utmb and __utmc cookies together identify a session.The content of the __utmc cookie is simply the domain hash.The content of the __utmb cookie will also be the domain hash plus, if the site is using ga.js,some additional values.The key difference between the two cookies is that __utmb is a persistent cookie with anexpiration date that is set 30 minutes after it is created. While __utmc is a temporary cookie thatis destroyed as soon as the visitor quits the browser.Let’s review what you know about a session, or visit, in Google Analytics. First note that theterms “session” and “visit” are used interchangeably. A session is defined by 30 minutes ofinactivity or if a visitor quits the browser.Each time the visitor navigates to a new page and the JavaScript in the Google AnalyticsTracking Code is executed, the __utmb cookie is refreshed and set to expire in 30 minutes.This is how a session can be 2 hours long. As long as the visitor remains active on the site, thesession remains active.But if the visitor stays on a page for more than 30 minutes, the __utmb cookie will be destroyed.The next time the visitor loads a page, Google Analytics won’t find a__utmb cookie. Instead, anew __utmb cookie is created and, from the standpoint of tracking, this is a new session.So, why is the __utmc cookie needed? Let’s say a visitor quits and starts the browser andcomes back right away to the same site. Since the __utmc cookie was destroyed, GoogleAnalytics will know that this is a new session.So, to summarize, when the visitor loads a page, the JavaScript in the Google AnalyticsTracking Code checks for both the __utmb and __utmc cookies. If either one is missing, it notesthis as a new session, and creates whichever cookie-- __utmb, __utmc, or both-- was missing.Note that it is possible to adjust this behavior. With a small customization to the GoogleAnalytics Tracking code, you can make the session timeout length anything you want. You’lllearn about this in the Code Customizations module. 30
  • The __utmz cookie stores the campaign tracking values that are passed via tagged campaignURLs.utmz=171169442 1108858716.2.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=toys2=session number3=campaign numberSo, for example, if a visitor comes to your site on a link tagged with campaign variablesutm_source, utm_medium, and utm_campaign, the values for these variables will be stored inthe __utmz cookie.Preceding the campaign tracking values, you will see four numbers stored in the __utmz cookie.The first number is the domain hash, as with the other Google Analytics cookies.The second number is a timestamp.The third and fourth numbers are the “session number” and “campaign number”, respectively.The “session number” increments for every session during which the campaign cookie getsoverwritten.The “campaign number” increments every time you arrive at the site via a different campaignor organic search, even if it is within the same session.The __utmz cookie has a six month timeout, meaning that a visit will be attributed to a particularcampaign for up to six months, or until the __utmz cookie is overwritten with another value.You can modify the six month timeout and you can change the rules which govern when the__utmz cookie value is overwritten. You’ll learn how in the Code Customizations module.The __utmz data shown here would show up in your All Traffic Sources report as coming fromthe source / medium “google / organic”.Now, in your browser’s cookie window, select the __utmz cookie from your visit togooglestore.com. Assuming that it was a direct visitThe slide shows how the values in the __utmz cookie map to campaign variables.For example, the utmcsr value in the __utmz cookie is the source, or the value that wasassigned to utm_source in the tagged link._utmz-Campaign Variables ● utmcsr in_utmz is the Source (utm_source) ● utmccn in_utmz is the Campaign (utm_campaign) ● utmcmd in _utmz is the Medium (utm_medium) ● utmctr in _utmz is the Keyword (utm_term) ● utmcct in _utmz is the Ad Content (utm_content) 31
  • So, if you reached “somesite.com” via a tagged URL that looks like this, then the __utmz cookiewould look like this.URL: http://www.somesite.com?utm_source=newsletter&utm_campaign=urchin5&utm_medium=cpc&utm_term=web+analytics&utm_content=banner_adCookie:utmz=171169442.1108858716.3.2.utmscr=newsletter|utmccn=urchin5|utmcmd=cpc|utmctr=web+analytics|utmcct=banner_adThe __utmv cookie is for custom visitor segmentation. You’ll only see this cookie if the sitecalls the _setVar() method. This cookie contains the domain hash, and one other value: thevalue you assign using _setVar().For example, suppose all site visitors who log in get set to “Member”, while those who do not login remain unassigned. The Google Analytics account owner would then be able to compare“Members” to those who are “(not set)” and see whether, for example, Members convert moreoften or spend more money on the site.The __utmv is a persistent cookie that expires after 2 years.Try searching your browser cookies for “utmv”. Any sites that appear will be those that use theGoogle Analytics custom segmentation feature.Refer to the module on Custom Visitor Segmentation to learn more about _setVar() and the__utmv cookie.Ecommerce TrackingIf your site sells products or services online, you can use Google Analytics e-commercereporting to track sales activity and performance. The Ecommerce reports show you your site’stransactions, revenue, and many other commerce-related metrics.Some examples of the kind of information you can get from the e-commerce reports include:• the products that were purchased from your online store• a list of transactions• the number of times people visited your site before purchasingE-commerce metrics are also available on the Ecommerce tab which appears in many reports.For example, on the Ecommerce tab of the AdWords Campaigns report, you can see how muchrevenue is associated with your AdWords campaigns. You can also see revenue associatedwith specific referrals, the number of transactions associated with organic search and averageper visit value across all traffic sources.In order to use e-commerce reporting, you’ll need to do three things. 32
  • 1. Enable e-commerce reporting within your Analytics website profile. • Click the Account Administration icon. Navigate to the desired account and web property. • Select the desired profile and click the Profile Settings tab. • Select “Yes” next to E-commerce Website and save your changes.2. Add or make sure that you’ve added the Google Analytics Tracking Code to your receipt page or “Transaction Complete” page.3. Finally, you’ll need to add some additional e-commerce tracking code to your receipt page so that you can capture the details of each transaction._addTrans() Call • The call to _addTrans() tells Google Analytics that a transaction has occurred. • The arguments to _addTrans() provide details about the transaction • _addTrans() takes the following arguments ○ Order ID*, Affiliation, Total*, Tax, City, State, Country (*=required fields) • You can type single-quote single-quote to leave an optional field blank, but note that Order ID and Total are required. • Your code will need to dynamically retrieve the values from your merchant software to populate these fields._addItem() Call • After the call to _addTrans(), there must be at least one call to the _addItem() method. • This call provides Google Analytics with details about the specific item purchased. • For each item that the visitor purchases, call addItem() • _additem() takes the following arguments: ○ Order ID*, SKU/Code*, Product Name, Category, Price*, Quantity* • For each item that a visitor purchases, call _addItem(). If more than one item is purchased, you’ll call _addItem() multiple times. • As with _addTrans(), you can leave some of the fields blank, but note that Order ID, SKU or Code, Price and Quantity are required arguments. • Use the same Order ID that you used in the call to addTrans(). • If you’re not sure how to write this code, contact your merchant software provider._trackTrans() Call • Finally, there is a call to the trackTrans() method which sends all the data to Google Analytics. • Sends both the transaction data and the item data to the GA server • Call after the Google Analytics Tracking Code calls _trackPageView() and after you’ve called _addTrans() and _addItem() 33
  • Remember that all of the e-commerce code must appear after the Google Analytics TrackingCode calls _trackPageview()Secure PagesThe standard Google Analytics Tracking Code automatically detects when an https protocol isbeing used. So you won’t need to add any special tracking code for secure pages. Generally,you’ll be placing ecommerce tracking code on a secure shopping cart page.For many e-commerce websites, the checkout process occurs on a separate domain orsubdomain. For example, if you send customers from www.mystore.com to cart.mystore.com,you’re sending them to a subdomain. If either of these scenarios applies to your site, you’ll needto add some code to some of your pages so that you can track activity across domains andsubdomains. The specific methods you’ll use are listed on the slide and you can learn how touse them in the module on tracking domains and subdomains.Domains & SubdomainsTracking Across Multiple SubdomainsSo far in this course, we’ve focused on tracking within a single domain. Before we learn how totrack across multiple domains, let’s understand why we might want to do this.A domain is a hostname that represents a numeric IP address on the internet. It allows us toeasily identify a website by a name instead of having to use a long string of numbers. Forexample, Google.com and YouTube.com are both domains owned by Google.You may sometimes need to track activity across multiple domains. A common example of thisis when you send visitors from your site to a separate shopping cart site to complete theirpurchases. However, since Google Analytics uses exclusively first party cookies, it can’tautomatically track whether those visitors actually complete a purchase or not, because thepurchase is taking place on another site.Phrased more generally, if a session spans multiple domains, it would not be possible to trackthe session as a single visit attributed to one visitor. So, you’ll need a way of sharing the cookieinformation between the two domains.By calling the _link() method, you can send this cookie information across domains.This allows Google Analytics to track a user across multiple domains by sending cookies viaURL parameters.To track across domains, you’ll need to follow two steps.Tracking Across Domains:Add a few lines to the Google Analytics Tracking Code on all pages of each site. 34
  • Call _setDomainName() with an argument of “none” and call _setAllowLinker() with an argumentof “true”. ● _gaq.push([‘_setDomainName’,’none’]); ● _gaq.push([‘_setAllowLinker’,true]);Use the _link() method in all links between domains.In this example, we’re updating all links from Google.com to YouTube.com and vice versa. Weupdate each link to call the _link() method as shown here. ● <a href=”http://www.youtube.com” onclick=”_gaq.push([‘_link’,’http:www.youtube.com’]); return=false;”>Go to our sister site YouTube</a>Now, when a user clicks on a link that takes them to the other domain, the session informationis preserved and the user is identified as being the same visitor across both domains.Transfering Via FormsIf you use a form to transfer your visitors from one domain to another, you will need to use the_linkByPost() method instead of the _link() method.This situation occurs most often with third party shopping carts. It can also be used to sendcookie to other domains in popups or in iFrames.To use forms to transfer from one domain to another, you must modify all the appropriate formswith the code shown here. ● <form action=”http://www.shoppingcartsite.com/myservice/formProcessor.php” name=”f” method=”post” onsubmit=”gaq.push([‘_linkByPost’, this]);”> ● …. ● </form>The _linkByPost() method will change the form action by adding query-string parameters to thevalue in the action attribute when the visitor submits the form.Tracking Across Multiple SubdomainsYou may also sometimes need to track across multiple subdomains. A subdomain is part of alarger domain and frequently each subdomain contains the pages for a specific department oroffering. For example, Google.com has several subdomains such as news.google.com,sites.google.com, and maps.google.com.Since Google Analytics uses first-party cookies, cookies set on a subdomain can notautomatically be read on the main domain, and vice versa. As with multiple domains, you needto explicitly share the cookie information between subdomains or you’ll lose session information.If you don’t share cookie information between your subdomains, it may appear as though yourown site is a referrer since only one domain is recognized as the main domain.Track across multiple subdomainsCall _setDomainName() and specify your parent domain name as the argument. This will allowthe Google Analytics Tracking Code to use the same cookies across the subdomains. 35
  • For example, to track across Google’s various subdomains, you would call _setDomainName()with an argument of “dot google dot com” . ● _gaq.push([‘_setDomainName’,’.google.com’]);A side effect of using this method is that your reports may not differentiate between visits toidentically named pages within the various subdomains.So, for example, visits to maps.google.com/home.html and mail.google.com/home.html wouldbe interpreted as visits to a single page. To correct this, you’ll need to set up an advanced filter.We’ll explain this in a minute.There are a few best practices for setting up your Analytics account to track across multiplesubdomains.First, create separate profiles for each subdomain. This way, you’ll be able to see reports foreach subdomain.Set up duplicate profiles - one master profile, plus one profile for each subdomain. In thisexample, we’re looking at two subdomains.Your master profile has no filters, and each of the other two has an Include filter.Profile 1 includes all traffic to both subdomains.Profile 2 includes only traffic to subdomain A.Profile 3 includes only traffic to subdomain B.Second, if you track across several subdomains within one profile, your reports may notdifferentiate between visits to identically named pages within the various subdomains. This isbecause the reports only show the Request URI -- which, in this example, is /home.html.The hostname -- maps.google.com -- is stored in the Hostname data field in Google Analytics.So, once you’ve called _setDomainName() to set your primary domain name, visits tomaps.google.com/home.html and mail.google.com/home.html would be interpreted as the samepage--”/home.html”.To correct this, you can set up an advanced filter to include the subdomain in your reports. Setup your filter as shown in the slide. ● Filter Type: Custom Filter>Advanced ● Field A: Hostname ● Extract A: (.*) ● Field B: Request URI ● Extract B: (.*) ● Output to: Request URI ● Constructor: /$A1$B1Note that the constructor must match exactly what is shown in the slide, starting with theforward slash. 36
  • The filter works by appending the Hostname to the Request URI. As a result, you’ll be able todistinguish between identically named pages on your subdomains. Results appear with thesubdomain attached.Tracking Across Multiple Domains with Multiple SubdomainsIf you want to track across both multiple domains and subdomains, you’ll need to ensure thatthe Analytics cookies are set across the subdomains and that the cookies are being passedbetween the parent domains.There are two steps.For the first step, add the lines of code shown in blue to Google Analytics Tracking Code onevery page of Domain 1 and each of its subdomains.Make sure that _setAllowLinker() has an argument of true and _setAllowHash() has anargument of false. ● _gaq.push([‘_setDomainName’,’.domain1.com’]); ● _gaq.push([‘_setAllowLinker’,true]); ● _gaq.push([‘_setAllowHash’,false]);Then, to each page of Domain 2 and each of its subdomains, add the same code -- but with adifferent argument to _setDomainName(). ● _gaq.push([‘_setDomainName’,’.domain2.com’]); ● _gaq.push([‘_setAllowLinker’,true]); ● _gaq.push([‘_setAllowHash’,false]);For step 2, call _link() or _linkByPost() in all links and forms that cross between the two parentdomains.For example, the code shown in the slide shows how you’d do this to track across Google.comand YouTube.com. ● <a href=”http://www.youtube.com” onclick=”_gaq.push([‘_link’,’http:www.youtube.com’]); return=false;”>Go to our sister site YouTube</a>Note that you don’t need to use _link() or _linkByPost() in links between subdomains within thesame domain.Again, you should create separate profiles in your account for each primary domain and/or eachsubdomain.You can easily do this by using an Include filter based on the hostname field.IN-DEPTH ANALYSISAdvanced Segmentation 37
  • With Advanced Segments, you can quickly isolate and analyze subsets of your traffic. You cancreate an advanced segment that only includes visits that meet a specific set of criteria. So, forexample you can create an advanced segment that only includes visits from a certaingeographic region or visits during which more than $100 was spent.Differences between Filtered Profiles and Advanced Segments ● Advanced segments can be applied to historical data, but a filtered profile will only filter traffic going forward. ● When you create an advanced segment, that segment is available across all of your accounts and profiles. But, a filtered profile is only useful for a specific web property. ● You can compare up to four advanced segments side by side in your reports. In contrast, filtered profiles can only be viewed one at a time. ● It is much easier to create an advanced segment than it is to create a filtered profile. ● If you want to permanently affect the data that a profile shows, you should use a filtered profile. So if you want a profile that only shows CPC data, you should set up a filtered profile to do this. ● And if you want to restrict user access to only a subset of data, the best way to do this is to set up a filtered profile and restrict the users access to only that profile.To apply an advanced segment, simply Click Advanced Segments and select the segments youwant. The Default Segments are predefined, so you don’t have to do anything to use themexcept to select them.Once you’ve applied one or more advanced segments, you can see the data for the segmentsthroughout all of your reports. You can also change your date range and see the segmentsapplied to historical data. The segments remain applied until you deselect them or you logoff.Example: Let’s create an advanced segment that only includes visits during which more than$100 was spent. ● Begin by clicking the Advanced Segments pulldown. ● Next, click Create a new advanced segment. ● Now you’ll see a screen that looks like this. ● Using this screen, you can combine one or more logical statements to define a segment. ● To include only visits during more than $100 was spent, first look for the metric Revenue. ● It’s usually easiest to type what you are looking for into the search box, but you can also browse the complete list of metrics and dimensions. ● Select the condition Greater than and specify 100. ● Click Preview Segment and you can see the percentage of total visits that are included in the segment. 38
  • ● You can add as many conditions to the segment as you like. When you’ve finished, click Save Segment. ● The segment will now appear in the Custom Segments area of the Advanced Segments pulldown.Analytics IntelligenceGoogle Analytics Intelligence monitors your website’s traffic to detect any significant changesand creates an alert when something important happens on your site. It can help you discoverinsights that might otherwise go unnoticed.There are two kinds of alerts. Automatic in green and custom in blue. Automatic alerts happenon their own without any input from you. Custom alerts are triggered based on conditions youwant Google Analytics to watch for. Wherever you see a bar, that means there was at least onealert on that date. Let’s look at 02/05. There is an alert for a big spike in visits for TechCrunch.Ordinarily we would expect between 0 and 220 visits. But on this day there were over 1900visits. If we go over to the TechCrunch site, it turns out that TechCrunch did a story on thesenew Google scarves that are being sold in the Google Store. This referral traffic would havebeen easy to miss but the alert flagged it. Click this button and we can look at just the trafficfrom TechCrunch . This was clearly a one time spike. Ordinarily we only get a handful of visits.The importance slider lets you view just the most significant alerts or by setting it to low all thealerts that GA created. The slider doesnt’ affect the how GA creates alerts. It’s just a way foryou to view fewer or more alerts in your reports.If you’ve linked your GA account with your AdWords account, you will also get automatic alertsfrom AdWords. For example, GA may signal an alert if the clickthrough rate for a campaignincreases unexpectedly. With a custom alert you tell GA what to watch for and GA alerts youwhen it happens.You create alerts through the settings “cog” and selecting the appropriate profile and selectingCustom Alerts. There you can select the parameters for the alert. Examples of alerts includewhen the bounce rate for a campaign increases over a specific level or when the weeklyrevenue reaches a certain level.Internal Site SearchGoogle Analytics provides internal site search reports that allow you to see how people searchonce they’ve arrived at your site.So why analyze how people search your site? 39
  • On both large and small sites, visitors frequently use search boxes as a form of navigation. Bylooking at what people search for, you can identify missing or hidden content on your site,improve search results for key phrases, and even get ideas for new keywords to use inmarketing campaigns.In order to set up Site Search Tracking for your website, you’ll need to configure your Profilesettings. Click the account administration icon at the top right of any screen in Analytics.Then navigate to the account, web property, and profile for which you want to enable SiteSearch reports.In the Site Search Settings section, select the Do Track Site Search radio button.In the Query Parameter field, enter the letter, word or words that designate an internal queryparameter. To find out what the query parameter is, perform a search on your site. Normallywhen a user searches on your site, their query can be found in the URL. For example, if yousearch on Google.com, you will see your search query preceded by q=. Therefore, Googlesquery parameter would be q. In the example above, the query parameter is q, and the querywas Google Analytics’. Your parameter might be different -- it could be the word "term” or“search”. Or it might be just a letter, like "s" or ”p". If you have a particularly large site, somesections of your site may use different query parameters. You may provide up to fiveparameters, separating each parameter by a comma.Next, select whether or not you want Google Analytics to strip out the query parameter fromyour URL.Stripping out the query parameter has the same effect as excluding URL Query Parametersunder Profile Settings General Information.So, if you choose to strip the query parameters, you dont have to also exclude them from yourmain settings. Note that Google Analytics will only strip out the query parameters you listed, andnot any other parameters in the same URL.If you use Categories‘ on your site - such as the ability to use drop-down menus to narrow asearch - you can include categories in your search analytics.First, select the “Site search categories” checkbox.Then, enter your Category Parameter in the field provided. Enter only the letters that designatean internal query category such as cat, qc,. The same principle that you used to identify thequery parameter can be used to identify the category parameter. Or, you can contact yourwebmaster to identify the query and category parameters for your site. 40
  • Decide if you want to strip out the category parameters that you just provided. If you select thecheckbox, only the parameters you provided will be stripped out.As with the query parameter setting, this has the same effect as excluding URL QueryParameters in the General Information section.So, if you choose to strip the category parameters here, you dont have to exclude them againfrom your main settings.Click ’Apply to finish.To find the Site Search reports, click Site Search under Content.Site Search Usage Report compares visitors who used site search to those who did not.Here we can see that 19% of all visits to this site included a search.Just above the pie-chart, you’ll notice two dropdown menus. if you select Goal Conversion Ratein the left-most dropdown, you can see how visits that included search compare to visits that didnot include search with respect to conversions.And, you can click the ecommerce tab to see how revenue and other ecommerce metrics differfor visits with and without site search.Search Terms Report only includes visits during which a search was performed. From thescreenshot on the slide, you can see that there were 76,331 total unique searches. The searchterms are listed in the table. You can see how each term compares in terms of number ofsearches, percentage of search refinements, and other metrics. Looking at the search termsthat people use to search once they are on your site can give you ideas for keywords that mightalso help drive traffic to your site.You can look at this traffic by another dimension. For example, if you wanted to see which citiesthese visitors came from, you could select City from the Dimension dropdown.Start Pages lists all of the pages from which visitors searched. To find Start Pages, clickPages under Site Search. Then, select “Start Page” as the viewing option above the table. Clickon a page in the table to learn more about the searches that occurred from that page. A detailreport will appear which lists all of the search terms that were used from that page. You can usethis report to find out what visitors are searching for from your landing pages and you can usethe information to improve the page content. For example, if many visitors search on "shippingoptions" from your shopping cart page, you may want to display shipping information directly onthe page. 41
  • Destination Pages tells you which pages are most commonly found through the search onyour site. To find Destination Pages, click Pages under Site Search. Then, select “DestinationPage” as the viewing option above the table. The table shows popular destination pages. Clickon a page in the table to see the specific search terms that led to the page.You can see which categories your visitors selected when searching your site.Go to the Search Terms report and click “Site Search Category” as the viewing option.This information helps you understand how visitors use your search engine, which productareas and categories are most popular, and how successfully visitors find what they are lookingfor in each category.Your Site Search reports will generally show a different number of conversions than what isshown in all of your other reports.This is because goal conversions in the Site Search reports are based on visits that include atleast one search on your website whereas the goal conversions shown in all other reports arebased on all visits.Because Site Search reports only include conversions from visits that included a search, youcan see how effectively searches on your site drive conversions.If you are confused about the difference between “search term” and “keyword”, it’s helpful toremember that Google Analytics reports use “search term” when referring to internal sitesearches and “keyword” when referring to external searches.Event Tracking and Virtual PageviewsMany websites use technologies such as Flash and Ajax to interact with visitors. For example,some websites embed video players, games, and other interactive experiences on site pages.However, the basic web analytics model of tracking pageviews doesn’t capture these kinds ofinteractions. This is because when a visitor interacts with a video player, for example, nopageview is generated.Some other examples of interactions that don’t generate pageviews are flash websites, videoplayers, dynamically generated pages (cgi, asp, php), Javascript & Ajax-based activities, filedownloads, and clicks on links that take the visitor to another site (external links).So how do you track these kinds of activities? There are two ways: virtual pageviews and EventTracking. 42
  • Virtual PageviewsYou can create a virtual pageview to represent practically any kind of activity or interaction youwant. You simply call _trackPageview() and provide any name you want as the argument. It’s“virtual” because you’re telling Google Analytics to register a pageview even though no newpage has actually been loaded. You’ll see these virtual pageviews alongside ordinarypageviews in the Pages and Content Drilldown reports.So you would call _trackPageview() each time an event occurs that you want to track: ● _gaq.push([‘_trackPageview’]);Provide a “filename” argument that identifies the event. For example: ● _gaq.push([‘_trackPageview’,’/events/playvideo’]);If you look at the Google Analytics Tracking Code, you’ll notice that it calls _trackPageview().This lets Google Analytics know that the browser has loaded a page. When you call_trackPageview(), however, you’ll want to provide an argument that specifies a virtualpagename for the event you’re tracking. Additional _trackPageview() calls should be made afterregular GA Tracking Code.Here are some more examples.In the first example, we’re tracking a download. ● <a href=”http://www.example.com” onClick=”_gaq.push([‘_trackPageview’,’/download/example.pdf’]);”>In the second example, we’re tracking a Flash event. ● on (release) { ● //Track with no action ● get URL(”_gaq.push([‘_trackPageview’,’/download/example.pdf’]);”); ● }In each of these cases, we’re simply calling _trackPageview() to register a virtual pageview.It’s a good idea to adopt a clear naming convention for your virtual pageviews. You might, forexample, group virtual pageviews into categories by giving them a virtual subdirectory (example:/download/brochure.pdf or /flashmovie1/play).Also, since virtual pageviews appear along with standard pageviews in reports, you may wish tocreate a duplicate profile where you filter out the virtual pageviews.To make this easy, you might organize all of your virtual pageviews into a “virtual” directory.(/virtual/).Event Tracking 43
  • The other way to track non-pageview interactions is to use Event Tracking. One advantage ofusing Event Tracking is that you won’t generate an extra pageview each time an interactionoccurs.Another advantage is that you can easily organize your events into categories, actions, andlabels. And you can even provide values for each event you track.All of your events show up in the Events reports within the Content section.Just call the _trackEvent() method each time you want to register an event. The slide shows thefull specification of _trackEvent() -- which you can also find documented on the Google Codesite -- and how you would actually call it, assuming that you are using Asynchronous Tracking. ● _trackEvent(category, action,optional_label,optional_value)You can call it as follows: ● _gaq.push([‘_trackEvent’,’name’,’label’,value ]);We’ll discuss the arguments to _trackEvent() in a minute.Here’s an example of how you’d call _trackEvent() from a Flash video player. In this example,_trackEvent will get called each time the visitor releases the Play button on the video player._trackEvent will register an event with a category name of “Videos”, an Action name of “Play”,and a Label of “Movie Drama”. ● onRelease(button){ ● getURL(“javascript:_gaq.push([‘_trackEvent’, ‘Videos’, ‘Play’, ‘Movie Drama’]);”)}Let’s look at each of the arguments to _trackEvent.Category (1st Argument) ● The name you supply for the group of objects you want to track e.g. ‘Videos’. ● Category is a name that you supply as a means to group objects -- which are usually user interface elements that you want to track. ● So, for example, if you have games and videos on your site, you’d probably want to have a “Games” category and “Videos” category. ● Click “Event Category” in the Top Events report to see all the user interface elements with which your visitors interacted.Action (2nd Argument) ● A string that is uniquely paired with each category, and commonly used to define the type of user interaction for the web object, e.g. “Play” or “Stop” button clicks. ● Action is the name you want to give to the type of interaction you’re tracking. ● So, for example, for Videos, you’d probably want to track how many times your visitors pressed Play. ● Click “Actions” in the Top Events report to see the interactions that occurred.Label (Optional 3rd Arugment) ● Further designation given to the event e.g. “Titanic” or “Finding Nemo”. 44
  • ● The Label argument is optional. A Label allows you to provide additional information for for the event you are tracking. ● For example, if you are tracking video plays, you might use the Label argument to specify the name of the movie that was played. ● Or, for file downloads, you might use it for the name of the file being downloaded. ● Click “Labels” in the Top Events report to see the the Labels of of the events that occurred.Value (Optional 4th Arugment) ● Numerical value assigned to the event e.g. load time. ● Value is the fourth, and optional, argument to _trackEvent(). ● Unlike the other arguments which are all strings, Value is an integer. You can use it to assign a numeric value to a tracked page object. ● You’ll then be able to see a sum total of these values in the Event Value column of your Events reports. ● You’ll also be able to see an average of these values in the Avg. Value column of your Events reports. ● So, you might, for example, specify a dollar value when a specific playback marker is reached on your video player. To call _trackEvent() without a value, simply omit the argument. ● Other examples: pass the time in seconds for a video to load;The strings that you provide for the first 3 arguments, Category, Action, and Label, govern howthe events will be organized in your reports.So, you’ll want to think carefully about how you want to structure your events.In your reports, you’ll notice that both Total Events and Unique Events are counted.Total Events is simply the total number of times an event occurs -- really it’s just the number oftimes _trackEvent was called.But, for Unique Events, each particular event is only counted once per visit.So, if during a single visit, a visitor presses Play 5 times on the same movie, Total Events will beincremented by 5.But Unique Events will only be incremented by 1, because for Unique Events, a particular eventis only counted once per visit.As we mentioned earlier, the arguments you provide when you call _trackEvent will govern howevents are organized in your reports.So, before you add the calls to _trackEvent to your site, consider these best practices. 45
  • First, determine in advance all of the kinds of events you’ll want to track.Try to create a hierarchy of Categories, Actions, and Labels that will grow with your needs.Work with your report users to make sure that the hierarchy makes sense.And use a clear and consistent naming convention for your Categories, Actions, and Labels.Using trackEvent() allows you to analyze event based interactions in much greater detail than ispossible using virtual pageviews.For example, instead of just seeing how many times a movie was played on your site, you cananalyze how people use your video player, and see how different events correlate with siteusage and ecommerce metrics.Also, by tracking events separately from pageviews, you won’t inflate your pageview count.Additional CustomizationsHow To Change Session Timeout ValueIn Google Analytics, a visit—or session—is defined by 30 minutes of inactivity, or when a userquits the browser. You can change the 30 minute default by calling setSessionCookieTimeoutas shown in the slide. Simply specify a new timeout value in milliseconds as the argument to_setSessionCookieTimeout(). ● _gaq.push([‘setSessionCookieTimeout’,3600000]);//change session to 1 hourHow to Change Campaign ExpirationBy default, a conversion can be attributed to a campaign that is up to 6 months old. But, if yourbusiness has a longer or shorter marketing campaign timeframe, you can change this value.Just call _setCampaignCookieTimeout() and specify your new campaign length in milliseconds.For example, let’s say that you want to set a campaign length of 30 days.To figure out the number of milliseconds that is, type “30 days in milliseconds” into GoogleSearch.The search engine will give you the answer which you can plug into_setCampaignCookieTimeout(). ● _gaq.push([‘_setCampaignCookieTimeout’,2592000000]);How to Change Campaign PrecedenceGoogle Analytics attributes conversions to the campaign that most recently referred the visitor. 46
  • For example, let’s say that someone discovers your site by clicking one of your AdWords ads.Then, they come back to your site by clicking a banner ad that you’ve tagged with campaignvariables. This time, they convert to one of your goals.By default, the banner ad will get the credit for the conversion, not the AdWords ad thatoriginally referred them.To change this behavior, you can tag all of your campaign links with utm_nooverride=1.If you do this consistently with all of your campaigns, Google Analytics will attribute conversionsto the first referring campaign, instead of the most recent one.Note that the utm_nooverride setting can be used in conjunction with autotagging. ● http://www.mysite.com/? utm_source=google&utm_medium=cpc&utm_campaign=backtoschool&utm_nooverride= 1How to Add Search Engines:Google Analytics automatically tracks referrals from over 30 search engines.But, if you want to add a search engine, you can do it by calling _addOrganic() in your GoogleAnalytics Tracking Code.First, perform a search in the search engine and look at the URL of the search results page.In the URL, look for the keyword you searched -- it should be preceded by a letter and an equalsign. This letter is the query variable for the search engine.In the example, the query variable is “p”.Add a call to _addOrganic in your Google Analytics Tracking Code. The first argument is thename of the search engine. The second argument is the query variable. ● _gaq.push([‘_addOrganic’,’supersearch’,’p’]);How To Treat Certain Keywords As DirectYou may wish to treat traffic that results from certain search keywords as Direct.For example, if someone searches for the exact name of your site, you might want to treat thatvisit as a Direct visit instead of a search.To do this, simply add a call to _addIgnoredOrganic() in your Google Analytics Tracking Code.Specify the keyword as the argument. ● gaq.push([‘_addIgnoredOrganic’,’googleanalytics’]);How to Treat Certain Referring Sites As DirectYou can also treat referrals from certain sites as Direct traffic instead of as referrals.For each site that you want to exclude as a referral and treat as Direct, add a call to_addIgnoredRef() in your Google Analytics Tracking Code.Specify the name of the site as the argument. ● gaq.push([‘_addIgnoredRef’.’www.sister-site.com’]); 47
  • 48