wa-page-view-examples

Jump to: navigation, search

Contents

Web Analytics Page View - Examples

This page captures common patterns in declaration of variables for use by Web Analytics products.

The Problem

Many web sites add JavaScript variables and text to web pages that categorise the content for measurement by web analytics products such as Google Analytics.

Participants

Real-World Examples

Links to public web pages, either popular or insightful

Page name

The most basic usecase. In the below examples the content of the webpage page is being identified as the site homepage for disambiguation and reporting in various products, ignoring the URL, HTML <title /> or first <h1 /> elements for this value.

Due to the implementation in JavaScript this data is declared along with other data to be further used in context of the page for Eccommerce, Advertising Campaign tracking, etc

Google Analytics documentation:

<script type="text/javascript">
   pageTracker._trackPageview('/homepage');
</script>

Omniture Homepage using SiteCatalyst:

<script type="text/javascript">
  s.pageName='Omniture: Homepage';
  s.channel='Home';
  s.prop6='English';
  if(mbox_prop_10) s.prop10 = mbox_prop_10;
  if(mbox_prop_9) s.prop9 = mbox_prop_9;  
</script>

The above data is merged with other sources and sent to a server via Image request parameters 'pageName':

AQB	1
AQE	1
bh	1024
bw	1199
c	24
c1	Non-Customer
c20	Non-Customer
c5	Now Defined by Test and Target
c6	English
c9	summit 2009 registration now open
ch	Home
cl	31536000
g	http://www.omniture.com/en/
j	1.7
k	Y
ndh	1
p	Default Plug-in;Java Embedding Plugin 0.9.6.4;QuickTime Plug-in 7.5.5;
        Flip4Mac Windows Media Plugin 2.2 ;Shockwave Flash;
pageName	Omniture: Homepage
pccr	true
s	1200x1920
server	www.omniture.com
t	15/9/2008 17:28:59 3 -60
v	Y
v0	natural_bookmark
v1	Non-Customer
v14	summit 2009 registration now open
v20	Non-Customer
v3	Now Defined by Test and Target
v4	English
v50	natural_bookmark

Webtrends Homepage using Analytics:

<script type="text/javascript">
  WT.pn = "Homepage";
</script>

and also recommends

<META NAME="WT.pn" CONTENT="Homepage">

This approach is used on Natwest Product Homepages Personal banking, Prospects introduction, Business banking and Commercial

<meta content="en" http-equiv="Content-Language"/>
<meta content="Personal banking, savings, investments 
  and hassle free online banking. NatWest - there is another way." name="description"/>
<meta content="NatWest personal banking, online banking, 
  savings, investments, insurance" name="keywords"/>
<meta content="NatWest.com" name="author"/>
<meta content="23/10/2008 15:59:31" name="created"/>
<meta content="NW/PERSONAL/INDEX" name="mlc"/>
<meta content="PERSONAL" name="channel"/>
<meta content="NatWest Personal banking" name="page-title"/>
<title>NatWest Personal banking</title>
<meta content="en" http-equiv="Content-Language"/>
<meta content="Exclusive benefits, a personal finance manager
  and access to our private banking member's website." name="description"/>
<meta content="Private Banking" name="keywords"/>
<meta content="Copyright NatWest.com (c) 2008" name="copyright"/>
<meta content="NatWest.com" name="author"/>
<meta content="23/10/2008 15:57:59" name="created"/>
<meta content="NW/PRIVATE/PROSPECTSINTRO" name="mlc"/>
<meta content="PRIVATE" name="channel"/>
<meta content="NatWest Private banking - Introduction" name="page-title"/>
<title>NatWest Introduction</title>
<meta content="en" http-equiv="Content-Language"/>
<meta content="NatWest Business Banking" name="description"/>
<meta content="NatWest Business, business users, business products,
   business accounts, business services,business guidance, business objectives" name="keywords"/>
<meta content="Copyright NatWest.com (c) 2008" name="copyright"/>
<meta content="NatWest.com" name="author"/>
<meta content="23/10/2008 16:00:10" name="created"/>
<meta content="NW/BUSINESS/INDEX" name="mlc"/>
<meta content="BUSINESS" name="channel"/>
<meta content="NatWest Business banking" name="page-title"/>
<title>NatWest Business banking</title>
<meta content="en" http-equiv="Content-Language"/>
<meta content="NatWest serves customers with an annual 
  turnover of £1m to £25m, and offers wide range of Commercial 
  Banking and Corporate Finance services such as Business Loans 
  and Commercial Mortages." name="description"/>
<meta content="NatWest, Commercial Banking, Business Loan, 
  Commercial Mortgage, Corporate Finance" name="keywords"/>
<meta content="Copyright NatWest.com (c) 2008" name="copyright"/>
<meta content="NatWest.com" name="author"/>
<meta content="23/10/2008 16:01:00" name="created"/>
<meta content="NW/COMMERCIAL/INDEX" name="mlc"/>
<meta content="COMMERCIAL" name="channel"/>
<meta content="NatWest Commercial banking" name="page-title"/>
<title>Commercial Finance, Business Loan, Commercial Mortgage, Corporate Banking - NatWest</title>

Bank of America Homepage using Coremetrics Web Analytics:

<script type="text/javascript">
  cmCreateRegistrationTag(null, 
    'ngen-personal', 
    '20090429:0:E:16CB099F-1520-01f4-00000000BFA6871D', 
    false, 
    null,
    null,
    'homepage'); // page name argument
</script>

Page type

In many cases the page is also of a recognisable type, in the below examples the page contains a product and is reported as a Product Page-View. Other page types could include:

Previous work - Googlecart HTML API docs and Googlecart JS API and XML tags in HTML

Google Analytics for products} and {http://www.google.com/support/googleanalytics/bin/answer.py?answer=55528&topic=11002 docs

Google Analytics E-Commerce:

<script type="text/javascript">
  pageTracker._addTrans(
    "1234",                                     // Order ID
    "Mountain View",                            // Affiliation
    "11.99",                                    // Total
    "1.29",                                     // Tax
    "5",                                        // Shipping
    "San Jose",                                 // City
    "California",                               // State
    "USA"                                       // Country
  );
 
  pageTracker._addItem(
    "1234",                                     // Order ID
    "DD44",                                     // SKU
    "T-Shirt",                                  // Product Name 
    "Green Medium",                             // Category
    "11.99",                                    // Price
    "1"                                         // Quantity
  );
  pageTracker._trackTrans();
</script>


PowerReviews on a Product Page

<!-- Begin PowerReviews scripts -->
  <script language="javascript" src="/reviews/pwr/engine/js/full.js"></script> 
  <script language="javascript">		
      var pr_locale='en_US';        
          var pr_ask_question='/reviewproduct.aspx?idmi=13753&appName=askQuestion';
          var pr_answer_question='/reviewproduct.aspx?idmi=13753&appName=answerQuestion&questionId=@@@QUESTION_ID@@@';
 
    var pr_page_id = '13753';
    var pr_zip_location='/reviews';
    var pr_write_review='/reviewproduct.aspx?idmi=13753';
    var pr_read_review='javascript:displayAB(1);';
    var pr_style_sheet='/css/review_styles.css';		
  </script>
  <!-- End PowerReviews scripts -->

Hitbox (now SiteCatalystHBX) on a Product Page

<script language="javascript">
 
var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
var hbx=_hbEvent("pv");hbx.vpc="HBX0140.01a";hbx.gn="ehg-evogear.hitbox.com";
 
//BEGIN EDITABLE SECTION
//CONFIGURATION VARIABLES
hbx.acct="DM540701FEVD95EN3";//ACCOUNT NUMBER(S)
hbx.pn="Burton+Custom+Wide+Snowboard+2008";//PAGE NAME(S)
hbx.mlc="outlet/product/snowsports/snowboarding/snowboards";//MULTI-LEVEL CONTENT CATEGORY
hbx.pndef="title";//DEFAULT PAGE NAME
hbx.ctdef="full";//DEFAULT CONTENT CATEGORY
 
//OPTIONAL PAGE VARIABLES
//ACTION SETTINGS
hbx.fv="2";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
hbx.lt="auto";//LINK TRACKING
hbx.dlf="n";//DOWNLOAD FILTER
hbx.dft="n";//DOWNLOAD FILE NAMING
hbx.elf="n";//EXIT LINK FILTER
 
//SEGMENTS AND FUNNELS
hbx.seg="";//VISITOR SEGMENTATION
hbx.fnl="";//FUNNELS
 
//CAMPAIGNS
hbx.cmp="";//CAMPAIGN ID
hbx.cmpn="";//CAMPAIGN ID IN QUERY
hbx.dcmp="";//DYNAMIC CAMPAIGN ID
hbx.dcmpn="";//DYNAMIC CAMPAIGN ID IN QUERY
hbx.hra="";//RESPONSE ATTRIBUTE
hbx.hqsr="";//RESPONSE ATTRIBUTE IN REFERRAL QUERY
hbx.hqsp="";//RESPONSE ATTRIBUTE IN QUERY
hbx.hlt="";//LEAD TRACKING
hbx.hla="";//LEAD ATTRIBUTE
hbx.gp="";//CAMPAIGN GOAL
hbx.gpn="";//CAMPAIGN GOAL IN QUERY
hbx.hcn="";//CONVERSION ATTRIBUTE
hbx.hcv="";//CONVERSION VALUE
 
//CUSTOM VARIABLES
hbx.hc1="";//CUSTOM 1
hbx.hc2="";//CUSTOM 2
hbx.hc3="";//CUSTOM 3
hbx.hc4="";//CUSTOM 4
hbx.hrf="";//CUSTOM REFERRER
hbx.pec="";//ERROR CODES
 
//COMMERCE VARIABLES
hbx.cacct="975407027475";
hbx.pr="Burton+Custom+Wide+Snowboard+2008";  //comma delimited products
hbx.bd="Burton";
hbx.ca="+snowsports+snowboarding+snowboards";
hbx.pc="";    //comma delimited prices
hbx.qn=""; //comma delimited quantities
hbx.sr="STORE";    //store
hbx.cp="null";  //campaign
hbx.cam="0";  //cart add methodology, 0 = highwatermark, 1 = incremental
hbx.pv=1;  //product view flag, 0 = cart add, 1 = product view
</script>

Existing Practices

Use cases

Common fields for a Page View can mostly be supplied by HTML4 tags, hatom and hnews

The following additional data is also commonly needed to be declared, collected and reported on:

Common fields for a Product Page View can mostly be supplied by nested hproduct, hreview and hlisting

Information about the user doing the Page View can mostly be supplied by nested hcard

The following additional data is also commonly needed to be declared, collected and reported on:

Proposal

An early proposal was developed unilaterally by jsHub.org to test the reaction of major web analytics vendors on the use of a microformat to replace and standardise their proprietary formats, and was well received during Q1+2 of 2009. This proposal is unofficially named 'hPage' and exploratory implementations on selected client sites are planned.

The technical reasons as to why an HTML based mark-up is attractive to analytics vendors are detailed here

See Also

wa-page-view-examples was last modified: Tuesday, November 3rd, 2009

Views