Setup Guide by Step 1: Create A Google Analytics Account Step 2: Analyze Your Website Step 3: Create A Profile Step 4: Link Google Analytics Account To Your Google AdWords Account Step 5: Add Tracking Code To Your Website Step 6: Configure E-Commerce Tracking Step 7: Tag Your Advertising Links (Optional) Bonus: Best Practices and Resources info@epikone.com
Welcome to the world of Web Analytics. You may not know it, but you've just taken the first steps to increasing the success of your online channel. Our goal is to help you set up Google Analytics correctly so you can make sound business decisions. As a Google Analytics Authorized Consultant, we've worked with a large group of diverse clients. We've learned the biggest challenge facing Google Analytics users is getting the installation configured correctly. If the setup is incorrect, then the resulting data will be useless or potentially harmful to your decision making process. That's why we've created this starter guide. To help you configure Google Analytics for your particular business. Based on our experience, we feel there are there are three factors to a successful implementation of Google Analytics. First, start with a macro understanding of your website. Answering simple questions like, "Why do I have a website?" or "What do I want my visitors to do?" will help in the implementation and configuration. Why? Because the specific actions that you want your visitors to take are derived from those bigger goals. If you can't answer the big questions then it will be difficult to grasp the details. Second, take your time. While it is true that a basic implementation of Google Analytics can happen in minutes, your specific implementation may be different. Read through this guide thoroughly and get acquainted with the concepts. Then go back and see how they apply to your site. Come up with an implementation plan and, at the very least, spend a week working on your Google Analytics installation. Finally, ask questions. If there is something you don't understand, or that needs clarification, contact us. Remember, you're going to use the data in Google Analytics to make important business decisions. If the configuration is incorrect, then the data could be wrong. Good luck! The Team info@epikone.com 2
info@epikone.com 3 Step One
StepOne Create A Google Analytics Account Signing up for a Google Analytics account is easy and free! Before you begin, choose one of the options below and follow the instructions provided: Existing Google AdWords Customers: Existing Google AdWords customers can sign up for Google Analytics via their AdWords account. Once in your account, click on the Analytics tab and follow the instructions. We strongly recommend that you sign up for Google Analytics via Google AdWords. This makes linking your Google AdWords and Google Analytics accounts much easier. New Google Analytics Customers: Following a few simple steps, it is easy for new customers to sign up for a Google Analytics account. Sign up now at www.google.com/analytics. Click on the Sign Up Now button and follow the instructions: Enter your website s URL (select http:// or https://). Enter a nickname for this account in the Account Name field. Click Continue. Enter your contact information. Click Continue. Read the Google Analytics Terms of Service. If you agree to these terms, select the Yes checkbox. Click Create New Account to continue. The Tracking Instructions page that appears contains the tracking code that you will need to add to every page of your site (The addition of the tracking code will be explained in greater detail in Step 4 of this guide). Click continue info@epikone.com 4
info@epikone.com 5 Step Two
StepTwo Analyze Your Website Websites are built using many different technologies. Some of these technologies complicate the Google Analytics Installation. Our guide is meant to walk you through a basic Google Analytics setup, but if you find your site has any of the elements listed below, you might need more help than what is listed in our Quick Start Guide. If you find you need further help, please contact us to get information on our support plans or visit the Google Analytics Help Center at: http://www.google.com/support/analytics/?hl=. Seek More Help If Your Website: Crosses Multiple Domains If your site does cross domains you will need to add the utmlinker() or the utmlinkpost() functions on all links and forms that take a user from one domain to another. For more information concerning cross domain tracking, visit the resources section at the end of this starter guide. Has Non-HTML Pages If your site has.pdf,.wmv, or other non-html based files that you would like to track, you ll need to tag these items with urchintracker() function. For more information on tracking non-html pages and files, visit the resources section at the end of this starter guide. Is Dynamically Created If your site is dynamically created, you may need to exclude query string variables that hold no relevance to the reporting. For more information on tracking dynamically created websites, visit the resources section at the end of this starter guide. Uses Frames The Google Analytics tracking code will need to be placed in the <head> section of the parent HTML file and also any child HTML pages. Without careful implementation you could see inflated visitor numbers and lose referring source information. For more information on tracking websites with frames, visit the resources section at the end of this starter guide. Uses Flash In order to track flash events accurately you will need to edit the.fla files to call the urchintracker() function. For more information concerning tracking flash events, visit the resources section at the end of this starter guide. info@epikone.com 6
info@epikone.com 7 Step Three
StepThree Create A Profile What Defines A Profile? A profile is a logical grouping of data and rules. Various rules (filters) can be applied to a profile to affect data in the reports. Usually each website is configured as a profile. Each profiles has a name so it can be identified in a list. Name profiles something simple yet descriptive: - www.mysite.com - www.mysite.com - no internal traffic You can create up to 50 profiles. How Do I Create A Profile? 1. Log into your Google Analytics account. 2. Click on the Add Website Profile link: 3. This will bring you to the Create New Website Profile page. 4. Choose between the two options that best fits your situation (continue you to next page). info@epikone.com 8
Add Profile For A New Domain: Add Profile For An Existing Domain: 1. Select whether the domain you would like to track uses http:// or https:// protocol. If you have secure pages on your site, (your URL starts with https://) then you will need to include the secure version of the Google Analytics tracking code. *An example of the secure tracking code can be found in Step 5 of this starter guide. The secure tracking code is used to prevent a warning from popping up in a visitors browser asking if they wish to display non-secure items on the secure page. You can include the secure version of the Google Analytics tracking code on non-secure pages without any warnings. 2. Add the domain URL of the domain you wish to track (excluding the http:// or https:// protocol). Use this option if you have already set up a profile and would like to create another profile that pulls from the same data as the original. Adding a profile to an existing domain allows you to test changes you would like to make to your original profile without affecting the original data, create GA reports with custom segmentation, or track additional goals. 1. Select the Domain you would like to apply the profile to from the drop down menu. 2. Name the profile. It s a good idea to use descriptive names so that you don t get confused when viewing a list of profiles. What Are Filters? Filters are a way of segmenting the information coming into your account which manipulates the final data in order to provide accurate reporting. Filters can be set up to perform a number of tasks, such as excluding an IP or only showing data for a particular sub-domain. EpikOne HIGHLY recommends that you at least set up a filter that excludes your own internal traffic. The idea here is that you don t want to see traffic from internal sources navigating your site as this will produce skewed data. How Do I Add Filters? 1. To add an Exclude Internal Traffic filter, you will need to click on the Edit link under the profile settings. info@epikone.com 9
2. Scroll down the page until you see the Filters Applied To Profile section and click the Add Filter link. 3. If you already have a filter that excludes internal traffic, then you can select it by checking the Apply Existing Filter To Profile radio button and adding the filter to this profile. If you don t have an existing filter that excludes internal traffic check the Add New Filter To Profile radio button and set up the filter as follows: Filter Name: Name the filter something descriptive so you can quickly find it if you add more filters in the future. Filter Type: Select Exclude all traffic from an IP address IP Address: Enter your IP address here. Be sure to escape regular expressions by putting \ in front of the periods as shown in the example bellow. If you don t escape regular expressions you could end up excluding more traffic than you initially intended. To learn more about regular expressions visit the resource section of this starter guide. xx\.xxx\.xxx\.x info@epikone.com 10
What Are Goals? A goal is a page of your website that you have defined as having value and would like to track metrics for. It s important that you have clearly defined Goals for your website. What is it that you want visitors to do when they visit your site? Some common goals are the Receipt page or the last page a visitor sees when completing an order, signing up for a newsletter, or the download of a product. Goal Funnels Think of the goal funnel as a series of steps the visitor of your site may go through to get to your goal conversion page. Using the funnel process you can analyze how user navigate your site on their way to the final goal page. Goal Setup 1. To set up Goals and Funnels you will need to click on the Edit link under the profile settings. 2. Navigate to the Conversion Goals And Funnel section of the page and click Edit next for the goal you wish to edit. 3. Enter the URL of the page that will be your final step of your goal. In the example of a checkout process this may be the receipt or Thank You page. 4. Enter the Name of the Goal. This should be something descriptive so you can easily differentiate between goals when you have multiple goals setup. info@epikone.com 11
5. The Define Funnel section is an optional section but can be used if you have a series of steps the user typically goes through to reach the final goal page. By defining a funnel you can use Google Analytics reporting to analyze the effectiveness of each step in the goal process. For instance using the Defined Funnel Navigation report you can analyze which steps of the goal funnel are causing visitors to leave the funnel, and then analyze those pages and look for what may be causing visitors to abandon the the goal. 6. Decide if your goal URLs should use case sensitive. Typically this optional is left unchecked as character case in the URL isn t a problem. 7. Change the Match Type based on the URLs you have put into the Goal/Funnel URL fields: Exact Match: This means the URL in the visitors browser will have to match exactly what you put in the URL fields in the form. In this example the URLs would not match and the goal would not be tracked. Users URL: /checkout/thank-you.html?orderid=7348 Goal URL: /checkout/thanl-you.html Head Match: This means that if the beginning of the URL in the visitors browser matches the URL in the Goal URL field then the visitor will be tracked. In this example both URL would match the Goal URL. Users URL: /checkout/thank-you.html Users URL: /checkout/thank-you.html?orderid=7348 Goal URL: /checkout/thanl-you.html Regular Expression Match*: This is an advanced option that allows for great flexibility in the setup of your goals. There are numerous books and other media explaining regular expressions. In short you can use special characters to help customize your goal URLs to be exactly what you want. In this example we can tell Google Analytics that Step two of the funnel process will contain one of two URLs. Either the URL /checkout/step-two-a.html or the URL /checkout/step-two-a.html. STEP 1: /checkout/step-one\.html STEP 2: /checkout/(step-two-a step-two-b)\.html STEP 3: /checkout/step-three.html *For more information on regular expressions visit the resources section at the end of this starter guide. 8. Use the Goal Value field to enter in the monetary value of your goal. This is an optional step. If your goal uses dynamic values such as the value of a users cart, leave this field blank and GA will fill in the dollar value of your carts automatically (assuming your site is setup correctly to capture commerce transactions and your Goal URL is the page that contains the utm form used with e-commerce). info@epikone.com 12
An Example of Basic Goal Setup: info@epikone.com 13
info@epikone.com 14 Step Four
StepFour Add Tracking Code To Your Website Below is an example of how the Google Analytics.js code is configured on basic html pages: <html> <head></head> <body> <script src= http://www.google-analytics.com/urchin.js type="text/javascript"> </script> <script type="text/javascript"> </script> _uacct="ua-xxxx-x"; urchintracker(); xxxx-x represents your Google Analytics account number. </body> </html> For Secure Pages: <html> <head> </head> <body> </body> </html> <script src= https://ssl.google-analytics.com/urchin.js type="text/javascript"> </script> <script type="text/javascript"> </script> _uacct="ua-xxxx-x"; // OTHER VARIABLES urchintracker(); Note: Any secure pages of your site will need the secure Google Analytics tracking code installed to prevent an error message from displaying when visitors visit the secure page. If it is easier to apply the secure tracking code throughout the site feel free to do so. You can use the secure tracking code on all pages of your site without it interfering with the data. info@epikone.com 15 xxxx-x represents your Google Analytics account number.
info@epikone.com 16 Step Five
StepFive (Optional) Link Google Analytics Account To Your Google AdWords Account If your Google Analytics account was set up through your Google AdWords account, then chances are the two accounts are already linked. If you know the accounts are linked or you don t have or want a Google AdWords account you can skip this step and move on to step six. After linking your Google Analytics account to your Google AdWords account, you will be able to see expanded reporting in Google Analytics. Use the same Google account for both your Analytics and AdWords accounts. Make sure the account is set up as an Administrator in Google Analytics. Linking Accounts: 1. Log in to your Google AdWords account. 2. Click on the Analytics tab. 3. Click Link It To Your AdWords Account (Bottom of the page). 4. From the Existing Google Analytics account drop-down list, select your Analytics account number. 5. Click Link Account. info@epikone.com 17
info@epikone.com 18 Step Six
StepSix (Optional) Configure E-Commerce Tracking How Does Google Analytics Track Commerce Data? Google Analytics uses a hidden form called the utmform and the addition of the utmsettrans() function to capture commerce information. The form should be placed on final page of the commerce transaction, after the transaction has been approved. This is typically the Receipt Page. Your cart will need to pull the appropriate values from a visitors cart and programatically dump these values into the hidden form on the last page of the checkout process. Google Analytics then looks for this form and if found pulls the information form and populates your Google Analytics account with the Transaction and Item information. The utmsettrans() function call should either be placed in an onload event of the body; <body onload="javascript: utmsettrans()"> or AFTER the hidden form: <form style="display:none;" name="utmform"> <textarea id="utmtrans">utm:t [order-id] [affiliation] [total] [tax] [shipping] [city] [state] [country] UTM:I [order-id] [sku/code] [productname] [category] [price] [quantity] </textarea> </form> <script type="text/javascript"> utmsettrans(); </script> What Should An E-Commerce Installation Include? Tag receipt page with Google Analytics code. Create hidden form field on receipt page. IMPORTANT: Add application code to populate hidden form field with shopping cart data. Reference utmsettrans() function in receipt page. Set up goal for e-commerce with goal value = 0. Enable E-commerce tracking in your Google Analytics account. info@epikone.com 19
Sample Installation: Bellow is an example of the three code blocks needed in the HTML of the receipt page that are needed for Google Analytics to track commerce transactions: (GREEN) The call to the utmsettrans function. (RED) The hidden form that holds the Transaction and Item information. Note that every item starts with the UTM:I declaration. So if someone orders 5 items there should be only one UTM:T but five separate UTM:I s in the form. (BLUE) The Google Analytics tracking code. <html> <head></head> <body onload= javascript:_utmsettrans() > <form style= display:none; name=utmform > <textarea id= utmtrans > UTM:T [order-id] [affiliation] [total] [tax] [shipping] [city] [state] [country] UTM:I [order-id] [sku/code] [productname] [category] [price] [quantity] UTM:I [order-id] [sku/code] [productname] [category] [price] [quantity] </textarea> </form> <script src= http://www.google-analytics.com/urchin.js type= text/javascript > </script> <script type= text/javascript > _uacct= UA-xxxx-x ; urchintracker(); </script> </body> </html> info@epikone.com 20
The Transaction And Item Lines In The Hidden Form: The fields total, shipping, tax and price, must only contain integer values. NO dollar signs or commas. Example: $1,000.56 would be 1000.56. Transaction Record Details: One per order. UTM:T order-id affiliation total tax shipping city state country order-id affiliation total tax shipping city state/region country Your internal order id number. Optional partner or store affiliation. Total dollar amount of the transaction. Tax amount of the transaction. The shipping amount of the transaction. City to correlate the transaction with. State or province. Country. Item Record Details: One for every item. UTM:I order-id sku/code product name category price quantity order-id sku/code product name category price quantity Your internal order id number (should be same as transaction line). Product SKU code. Product name or description. Category of the product or variation. Unit-price of the product. Quantity ordered. Important: Please note that a line must exist for each item that the visitor purchases. If the visitor purchases 3 items, all with different SKUs, then the hidden form field must contain three separate UTMI lines, one for each item. Every variable or a place for the variable must be present in both the Transaction line (UTM:T) and the Item line (UTM:I). If your item does not have certain fields such as a sku/code the pipe separators must still be there. Example: (No tax and no sku/code) UTM:T [order-id] [affiliation] [total] [shipping] [city] [state] [country] UTM:I [order-id] [productname] [category] [price] [quantity] info@epikone.com 21
Common Problems When Setting Up E-Commerce Shopping cart domain is different than the website domain: Due to the rigidity of many third party carts it may not be possible to track commerce information with Google Analytic. You will need to add the Google Analytics tracking code to each page of the checkout process. On the final page of the checkout process you will need to add the hidden form, Google Analytics tracking code, and the utmsettrans function. You will need to check with your cart provider to see if they allow for this customizability. UTM must be installed on both sites. UTM cookies must be transferred between domains using utmlinker(). The umlinker() function will need to be placed on any links crossing domains so cookies are transfered correctly and visitor information isn t lost. Transactions missing from reports: Google Analytics filters transactions to eliminate duplicates. Removing transactions: Create and process a transaction that has the same transaction number as the transaction you would like to delete. Set the total value to the negative of the original transaction value. Submit the transaction to Google Analytics using a fake HTML form on your website. info@epikone.com 22
info@epikone.com 23 Step Seven
StepSeven Tag Your Advertising Links (Optional) If you want to track your online advertising efforts you can do so by using a method called link tagging. Link tagging allows you to include valuable information about a visitor entering your site, wether it s from an email, a banner ad, comparison shopping network, or cost per click campaign. How It Works With Google Analytics When you create a link that goes from an outside source to your site, you add on additional query string variables. When the visitor arrives at your site these query string variables are present in the URL. Google Analytics then looks for these variables in the URL, pulls them out, and puts them into the appropriate reports. Example: You have a banner ad on someone else's site that links back to your own home page. The original link for the banner is: http://www.mysite.com/ This will show up in the reports as a referral from whatever site the banner ad was on. So instead we ll add some campaign tracking variables to get more accurate information on the visitor: http://www.mysite.com/?utm_source=site-my-ad-is-on&utm_medium=banner-ad Now in the Google Analytics reports you ll be able to see they came from site-my-ad-is-on and they clicked on the banner-ad to get to your site. info@epikone.com 24
Tagging Your Links Add tracking variables to your destination URL like any other query string variable. Google Analytics then pulls these variables out of the URL and puts them into the utmz cookie. Minimum variables are: utm_campaign utm_medium utm_source Five Aspects Of Campaign Tracking: Below is a chart outlining how the five campaign tracking variables are intended for use. Common Name Query String Variable Think Of It As: Example Campaign utm_campaign A marketing campaign as a Fall Campaign whole. Medium utm_medium Medium the person is using Email to get to your site. Source utm_source The vendor used. Email Marketing Provider Content utm_content To differentiate between similar Text vs Images ads, emails, etc. Term utm_term The keyword or phrase being The words of the link. used in the ad. info@epikone.com 25
The Google Analytics URL Builder: http://www.google.com/support/analytics/bin/answer.py?answer=27255&query=+analytics +URL+Builder&topic=&type= Google s URL builder tool can help you create a link quickly and accurately. This is a great tool to get an understanding of how your links should look, however if you have hundreds of links, tagging each one in this manor can be a bit laborious. Note: Auto-tagging and link tagging append additional query string parameters on to the end of URL s pointing to your site. In some cases these extra query string parameters will cause the visitor to be transfered to an error page. Check with your server administrator to make sure your site allows for these additional query string parameters. info@epikone.com 26
Sample Configuration: Bellow is an example of the three code blocks needed in the HTML of the receipt page that are needed for Google Analytics to track commerce transactions: (GREEN) The call to the utmsettrans function. (RED) The hidden form that holds the Transaction and Item information. Note that every item starts with the UTM:I declaration. So if someone orders 5 items there should be only one UTM:T but five separate UTM:I s in the form. (BLUE) The Google Analytics tracking code. <html> <head></head> <body onload= javascript:_utmsettrans() > <form style= display:none; name=utmform > <textarea id= utmtrans > UTM:T order-id affiliation total tax shipping city state country UTM:I order-id sku/code productname category price quantity UTM:I order-id sku/code productname category price quantity </textarea> </form> <script src= http://www.google-analytics.com/urchin.js type= text/javascript > </script> <script type= text/javascript > _uacct= UA-xxxx-x ; urchintracker(); </script> </body> </html> Best Practices info@epikone.com 27
Best Practices For Google Analytics Setup Take the time to analyze your website prior to adding urchin.js script. At first glance, setting up Google Analytics may seem simple. But sometimes there's more to it then adding the tracking code to your pages. Be sure to analyze your website and look for any potential 'red flags'. You can use Step Two of this starter guide to identify some of the common website configurations that cause problems with a Google Analytics installation. Plan your implementation carefully. Once you have reviewed your site, and know what needs to be done to install GA, set up a plan. Literally write down all the steps so you have a clearly defined process, then start the implementation. Set up goals. While measuring the basic traffic patterns of your website is important, it is absolutely vital to measure the processes that you want visitors to engage in. The task could be as simple as signing up for a newsletter, but you need to know if people are completing the task. If you do not set up a goal to measure these tasks then you will not know if your website is truly effective. Do not add urchin.js until all of your profile has been created. Once you add the urchin.js tracking code Google Analytics will start to populate your reports with data. If your configuration is incorrect then the reports will contain inaccurate data. Take the time to make sure all the profile settings are correct before you add the tracking code. This way, when you add the tracking code you know the data is accurate. When making changes to your Google Analytics account create a duplicate profile and test the changes on that first. Make sure you have implemented the changes correctly before changing your original profile. Changing the settings on a profile can be scary. If you add a filter incorrectly you could loose all your data. We recommend that you create a test profile. This profile should be created using the same domain as your master profile. Use this 'test' profile to try out new filters and goal settings. By using this test method you can avoid problems with bad data that may arise as a result of having an improperly setup goal or filter. Once you have refined the settings, and are comfortable with the way they work, you can apply them to your master profile. Define which metrics your business wishes to track. Everyone's business is different. This means that the metrics you use to measure success will be different. When your setting up Google Analytics, keep an eye out for the metrics that will best measure your site s performance. info@epikone.com 28
info@epikone.com 29 Resources
EpikOne Resources: Analytics Talk Blog: http://www.epikone.com/blog/ EpikOne Company Blog: http://epikone.blogspot.com/ Support Services: http://www.epikone.com/google-professional-services/support Google Solutions: http://www.epikone.com/google-solutions/ EpikOne Tools: Non-HTML and Outbound click tracker tool- If you have hundreds of non-html files and outbound links on your pages or new ones are being added constantly it can be difficult to keep adding the urchintracker function to all the links. Upon request we can provide you with a JavaScript script that will automatically tag non-html and Outbound links on the fly. Regular Expressions Tester: Validate your regular expressions before applying them to your profile: http://www.epikone.com/tools/regular-expression-filter-tester. Confirm that your Google Analytics setup is accurate with SiteScan. Developed by EpikOne, SiteScan crawls through every page of your website to determine whether or not the tracking code is installed properly: http://www.sitescanga.com Google Analytics Resources: http://www.google.com/support/analytics/ Adding Tracking Code: http://www.google.com/support/analytics/bin/answer.py?answer=26908 Setting Up Goals: http://www.google.com/support/analytics/bin/answer.py?answer=26910 Setting Up Filters: http://www.google.com/support/analytics/bin/answer.py?answer=26798 Setting Up E-commerce: http://www.google.com/support/analytics/bin/answer.py? answer=27203 Campaign Tracking: http://www.google.com/support/analytics/bin/answer.py?answer=27253 Tracking flash elements: http://www.google.com/support/analytics/bin/answer.py? answer=27243 Tracking with framed sites: http://www.google.com/support/analytics/bin/answer.py? answer=44728 Tracking individual non-html files: http://www.google.com/support/analytics/bin/answer.py? answer=27242 Tracking JavaScript elements: http://www.google.com/support/analytics/bin/answer.py? answer=27244 Tracking across multiple domains: http://www.google.com/support/analytics/bin/answer.py? answer=27267 Regular Expressions: http://www.google.com/support/analytics/bin/answer.py? answer=27217&query=regular+expressions&topic=&type= info@epikone.com 30
Include and Exclude filters: http://www.google.com/support/analytics/bin/answer.py? answer=27292 The Google Analytics URL Builder: http://www.google.com/support/analytics/bin/answer.py?answer=27255&query=+analytics +URL+Builder&topic=&type= Google s URL builder tool can help you create a link quickly and accurately. This is a great tool to get an understanding of how your links should look, however if you have hundreds of links, tagging each one in this manor can be a bit laborious. EpikOne URL builder (You Must Have A Google Account To Use This): This tool allows you to quickly generate multiple URLs that are properly tagged. http://www.epikone.com/resources/ info@epikone.com 31