Coding Series: Part I – How To Install Google Analytics
This is the first post in what will likely be a five-part instructional series on valuable codes that can easily be installed, and if done so correctly, Google Analytics will provide substantial insight into your website traffic and your return on advertising dollars.
Google Analytics is one of Google’s free tools that allows advertisers to customize over 80 reports to track all activity on their website. Advertisers can gain key insights into what visitors do and how those actions contribute to the success of their business through these customizable reports focused on visitors, traffic sources, content, goals, and ecommerce.
Code Implementation: Google Analytics
Signing up for Google Analytics is simple and free, with four easy steps to complete before accessing a world of analytics. Go to https://www.google.com/analytics/provision/signup to get started. Once the account is set up, you can find your personal code snippet within the Profile Settings of your Google Analytics account.
To access your tracking code from Google Analytics:
- Log in at https://www.google.com/analytics.
- Select the profile from the accounts Overview page.
- From that profile’s Actions column, click ‘Edit.’
- At the top right of the ‘Main Website Profile Information’ box, click ‘Check Status.’
- The tracking code can be copied and pasted from the text box in the Instructions for Adding Tracking section.
Code snippet sample:
<script>
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl/.” : “https://www.”);
document.write(unescape(“”));
</script>
<script>
try{
var pageTracker = _gat._getTracker(“UA-xxxxxx-x”);
pageTracker._trackPageview();
} catch(err) {}
</script>
For basic installation, copy and paste the code segment into the bottom of your content, immediately before the </body> tag of each page you are planning to track. You will need to update the “xxxx-x” in the sample above with your own Google Analytics account number.
Gauging Performance: Google AdWords with Google Analytics
In Adwords, a user’s action is labeled a “conversion,” whereas the same activity in Analytics is listed as a “goal.” In order for Google Analytics to calculate goal conversion metrics, you must create one or more goals.
Before setting up a goal, make sure you have the following requirements.
- Name the goal: Specify a name that you will recognize when viewing the goals within your reports. Examples of names you might use include ’email sign-up’ or ‘article ABC download.’
- Define the funnel: While funnels are optional, defining one can help you map where visitors drop off during the path to completing a goal.
- The value of the goal: Google Analytics uses an assigned goal value to calculate ROI, Average Score, and other metrics.
Setting up goals:
- Select the account that you’ll be creating goals for from the Overview page of Google Analytics.
- Find the profile for which you will be creating goals, and click ‘Edit’ under the ‘Actions’ column.
- Under the ‘Goals’ section, select one of the four sets to create the goal (each set contains up to five goals) and click ‘Add goal.’
- Enter the goal’s name so that you can quickly recognize it when viewing reports.
- Turn the goal ‘On’ or ‘Off.’
- Select the goal’s position. The pull-down menu allows you to select a goal’s position in a set so that you can control the order in which it appears from the ‘Goals’ tab in your reports.
- Decide which one of the three types of goals you want. This can be URL Destination, Time on Site, or Pages/Visit.
- Once you select the radio button for the goal type, a field for ‘Goal Details’ should appear.
Here’s a great example from Google on how to set the value of a goal:
“The value of the goal: Google Analytics uses an assigned goal value to calculate ROI, Average Score, and other metrics. A good way to value a goal is to evaluate how often the visitors who reach the goal become customers. If, for example, your sales team can close 10% of people who request to be contacted, and your average transaction is $500, you might assign $50 (i.e. 10% of $500) to your “Contact Me” goal. In contrast, if only 1% of mailing list signups result in a sale, you might only assign $5 to your “email sign-up” goal.”
Defining funnels:
After entering goal information, define a funnel if you’ve selected a ‘URL Destination’ goal type:
- Click ‘Yes, create a funnel for this goal.’
- Enter the ‘URL’ of the first page of your conversion funnel. This page should be one that is common to all users working their way towards your goal.
- Enter a ‘Name’ for this step.
- If this step is a ‘Required step’ in the conversion process, select the checkbox to the right of the step. If this checkbox is selected, users reaching your goal page without traveling through this funnel page will not be counted as conversions.
- Continue entering goal steps until your funnel has been completely defined. You may enter up to 10 funnel steps or as few as a single step.
- Click ‘Save Changes’ to create this goal and funnel.
Linking your AdWords account to Google Analytics will allow you to take advantage of extensive reporting options. It will also enable you to spot further ad opportunities by viewing AdWords conversions alongside Analytics goal/transactions. You can obtain detailed tracking information by creating customized statistics that will allow you to calculate return on investment.
To link:
- Add your AdWords username to your Analytics account as an Account Admin.
- In AdWords, select Reporting tab and choose ‘Google Analytics.’
- Select ‘I already have a Google Analytics account.’
- From the Existing Google Analytics Account drop-down menu, select the name of the Analytics account.
- Then, select ‘Link Accounts.’
Google Analytics is a smart web analytics solution that enables you to analyze website performance, gauge the effectiveness of your marketing campaign, and create better-performing advertisements. To find out more visit: https://www.google.com/analytics/. If you have any other questions about the functionality of Google Analytics or how to install the code, please feel free to contact us or follow up with your Leverage Marketing account manager.
This really answered question so a quick thank you is in order.