Difference between revisions of "Google Analytics Setup"

From Whirlwind eCommerce Wiki
Jump to: navigation, search
(Goal Tracking: Checkout)
Line 86: Line 86:
 
::* Name: "Signup Confirmation"
 
::* Name: "Signup Confirmation"
 
* Hit "Save Goal" button. - Your goal funnel is now set!
 
* Hit "Save Goal" button. - Your goal funnel is now set!
 +
 +
==Related Links==
 +
 +
[http://www.cellulite.co.uk/ '''cellulite''']

Revision as of 06:00, 30 July 2010

Basic Setup

To setup GA (Google Analytics) to support page visitation activity reporting, place the following code in the bottom of every template on the web site, after the end body tag, before the end html tag. If you have a common footer(s) for the site, simply place in the common footer(s). NOTE: Be sure toe replace the UA number (UA-123456) with your web site's Google provided UA number.

// set pageCode
// tell system to send the fuseaction as the override pageCode 
// if the fuseaction is anything other than PAGE.view
$pageCode = ($attributes['fa'] == 'PAGE.view') ? NULL : $attributes['fa'];
 
// display googleTrack code
echo eV::googleTrack('UA-123456',$pageCode);

eCommerce Setup

To setup GA to support eCommerce transaction monitoring and reporting, place the following code in the bottom of the checkout complete template:

// get orderid from the order number (should automatically be passed in URL to order complete page)
$orderId = eV::orderGetIdFromNumber($attributes['orderNumber']);
 
// get the order data array for the passed order
$orderArr = eV::orderGetCompleteArray($orderId);
 
// display the google ecommerce transaction code
// MUST appear after eV::googleTrack has been outputted
echo eV::googleTrackTrans($orderArr);

Once that is complete, you need to access the Google analytics account and confirm that the site profile is set as an "Ecommerce Website". Here are the instructions from Google on how to set that up. [1]

Goal Tracking: Checkout

The following explains how to setup a Checkout Goal Tracker in Google Analytics for a Whirlwind eCommerce site.

  • Log into GA
  • Select to Edit the site profile for your web site
  • Select "Add Goal"
  • Enter the following into the available fields:
  • Goal Name: "Checkout"
  • Active Goal: "On"
  • Goal Type: "URL Destination"
  • Match Type: "Regular Expression"
  • Goal URL: "/ORDER.checkoutComplete"
  • Case Sensitive: UNCHECKED
  • Step 1: (keep adding steps until all steps are complete)
  • URL: "/"
  • Name: "Visit"
  • Step 2:
  • URL: "/ORDER.cartView"
  • Name: "View Cart"
  • Step 3:
  • URL: "/ORDER.register"
  • Name: "Register"
  • Step 4:
  • URL: "/ORDER.checkoutBilling"
  • Name: "Billing Address"
  • Step 5:
  • URL: "/ORDER.checkoutShipping"
  • Name: "Shipping Address"
  • Step 6:
  • URL: "/ORDER.checkoutPayment"
  • Name: "Payment"
  • Step 7:
  • URL: "/ORDER.checkoutConfirmation"
  • Name: "Confirmation/Review"
  • Hit "Save Goal" button. - Your goal funnel is now set!

Goal Tracking: Email Signup

The following explains how to setup an Email Signup Goal Tracker in Google Analytics for a Whirlwind eCommerce site. There are two ways that the email signup process may operate. One version (outlined below) will bring all users to the email signup form from the left column signup box. The other version allows the user to enter their email in the left menu OR on the email signup form page in which case you only need one step for this funnel (skip step 1)

  • Log into GA
  • Select to Edit the site profile for your web site
  • Select "Add Goal"
  • Enter the following into the available fields:
  • Goal Name: "Email Signup"
  • Active Goal: "On"
  • Goal Type: "URL Destination"
  • Match Type: "Regular Expression"
  • Goal URL: "pageId=38" (This is the default pageId for confirmation for email signup. Be sure to confirm that this is the correct pageId in page management)
  • Case Sensitive: UNCHECKED
  • Step 1: (skip this step if the website is allowing signup from the left menu without requiring the user to complete the fields on the email signup page form.)
  • URL: "pageId=35" (This is the default pageId for the email signup form page. Be sure to confirm that this is the correct pageId in page management)
  • Name: "Signup Page"
  • Step 2:
  • URL: "pageId=38" (see above "goal URL" note)
  • Name: "Signup Confirmation"
  • Hit "Save Goal" button. - Your goal funnel is now set!

Related Links

cellulite