Skip to ContentSkip to Main Site NavigationSkip to Section NavigationSkip to Quick LinksSkip to Site Utility Navigation
Sep16

Google Analytics Site Search Setup Guide

Brad Henry
in Google Analytics

New Google Analytics Tracking Code SLI Setup:

1.    Starting from the “Analytics Settings” page, click “Edit” under settings, then click “Edit” again under the main Website Profile Information section. This will present the following options.

2.    Select “Do Track Site Search”

3.    Complete a Site Search on your website and view the resulting URL and find the keyword phrase you used as a test.  Identify the query parameter that immediately precedes your test query and insert it into the Query Parameter box as seen in the setup below.  Be sure to replace with your parameters versus what is in the example below.

4.    If you have categories, follow the same test and place your Category Parameter in the box below as well.

Google Analytics Site Search Setup
Google Analytics Tracking Code for Results Hosted on SubDomain:

** Must be placed on every page on both the main domain and the search results sets.

<script type=”text/JavaScript”>
var gaJsHost = ((”https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(”%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
</script>
<script type=”text/javascript”>
var pageTracker = _gat._getTracker(”UA-789266-1″);
pageTracker._setDomainName(”replacewithyourdomain.com”);
pageTracker._initData();
pageTracker._trackPageview();
</script>

Google Analtyics Tracking Code for Third Party Tracking:

Complete the steps listed above and follow the instructions listed below.

The following code must be placed on all pages on both websites.

<script type=”text/JavaScript”>
var gaJsHost = ((”https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(”%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
</script>
<script type=”text/javascript”>
var pageTracker = _gat._getTracker(”UA-642481-1″);
pageTracker._setDomainName(”replacewithyourdomain.com”)
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._initData();
pageTracker._trackPageview();
</script>

The action in the form must also contain an onsubmit event using the following code:

“pageTracker._linkByPost(this)”

** Every link on either site that allows visitors to cross each domain including all search results must also contain the following code in the onclick event:

pageTracker._link(’http://www.websiteaddress.com’); return false;

Ecommerce Setup and Tracking:

Access the “Edit Profile Information” configuration through the same steps as setting the Site Search.

Select “Yes, an E-commerce Site”

Google Analytics Ecommerce Setup

Select your currency and related settings.

You will need to embed the following GA Ecommerce Tracking code into your website’s ecommerce Confirmation Page.  This code will need to be integrated with your existing ecommerce platform and will have to dynamically extract the information either from the database or from variables that can be carried over from the shopping cart.

** This step will require programming knowledge and custom programming in order to extract the correct variables and build an array for instances where there may be multiple products.  The array will then dynamically add all the products and build the correct coding to deliver the information to Google Analtyics. If this step is not completed correctly, your ecommerce will not function.  You can not copy and paste the code below and have it function for your system.

<script type=”text/javascript”>
pageTracker._addTrans(
“order-id”, // required
“affiliate or store name”,
“total”,
“tax”,
“shipping”,
“city”,
“state”,
“country”
);

pageTracker._addItem(
“order-id”, // required
“SKU”,
“product name”,
“product category”,
“unit price”,  // required
“quantity”  //required
);

pageTracker._trackTrans();
</script>

Example of Reports Available Once Setup is completed:

Google Analytics Site Search Example

Google Analytics Site Search Snapshot

Google Analytics Screenshot Site Search

Snapshots Google Analytics Ecommerce Reports

The reports above are only a few examples of the available reports.  You have the option to dig down on any of these and investigate peculiar or interesting information in much further detail.  I hope this has been helpful and if you have any questions, please let me know.

Thanks,

Brad

Bookmark this article!

TechnoratiStumbleUponDel.icio.usDigg


Tags: , ,

Leave a Reply



Beacon Technologies, Inc.
164B Thatcher Rd.
Greensboro, NC  27409
toll-free: 877.602.3617
local: 336.931.1295

Information

Beacon Technologies specializes in ecommerce website development, Website design, content management systems (Cascade Server), custom software development, hosting, Search Engine Optimization and Google Analytics. Beacon has provided innovative Internet and website marketing solutions to hundreds of successful clients. Our customer-focused attitude and exceptional drive for excellence sets us apart from other Greensboro and Charlotte Web Site Design and Development, Custom Software Development, Ecommerce Website Development, and Search Engine Optimization Firms. We set the bar high for creative design and development practices and always take pride in our work. Contact Beacon today to talk with an expert about how we can provide a solution for you.

Entries (RSS) and Comments (RSS).

Beacon Technologies, Inc. Web Blog