wa-page-view-examples: Difference between revisions
Metafeather (talk | contribs) m (Tidy up links and text width) |
Metafeather (talk | contribs) m (Formatting edits and add references to hreview) |
||
Line 13: | Line 13: | ||
''Links to public web pages, either popular or insightful'' | ''Links to public web pages, either popular or insightful'' | ||
=== Page | === Page name === | ||
The most basic usecase. In the below examples the content of the webpage page is being identified as | 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 <code><title /></code> or first <code><h1 /></code> 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 | 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 | ||
Line 163: | Line 163: | ||
</source> | </source> | ||
=== | === 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: | |||
* Homepage (either site, channel or product) | |||
* Landing page | |||
* Error page | |||
* Login page | |||
* Logout page | |||
Previous work - [http://groups.google.com/group/google-checkout-developers-forum/web/google-checkout-cart-api-documentation Googlecart HTML API docs] and [http://groups.google.com/group/google-checkout-developers-forum/web/google-checkout-shopping-cart-javascript-api Googlecart JS API] and [http://groups.google.com/group/google-checkout-developers-forum/web/including-xml-tags-in-the-html-api XML tags in HTML ] | Previous work - [http://groups.google.com/group/google-checkout-developers-forum/web/google-checkout-cart-api-documentation Googlecart HTML API docs] and [http://groups.google.com/group/google-checkout-developers-forum/web/google-checkout-shopping-cart-javascript-api Googlecart JS API] and [http://groups.google.com/group/google-checkout-developers-forum/web/including-xml-tags-in-the-html-api XML tags in HTML ] | ||
Line 326: | Line 334: | ||
* Custom name/value pairs or tags | * Custom name/value pairs or tags | ||
'''Common fields for a Product Page View can mostly be supplied by nested [[hproduct]] and [[hlisting]]''' | '''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]]''' | '''Information about the user doing the Page View can mostly be supplied by nested [[hcard]]''' | ||
Line 350: | Line 358: | ||
* ''Other microformats'' | * ''Other microformats'' | ||
* [[hproduct]] | * [[hproduct]] | ||
* [[hreview]] | |||
* [[hlisting]] | * [[hlisting]] | ||
* [[hnews]] | * [[hnews]] | ||
* [[hcard]] | * [[hcard]] | ||
* ''Normative references for tags used'' | * ''Normative references for tags used'' |
Revision as of 15:19, 3 November 2009
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
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>
<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:
- Homepage (either site, channel or product)
- Landing page
- Error page
- Login page
- Logout page
Previous work - Googlecart HTML API docs and Googlecart JS API and XML tags in HTML
- product - An element containing shopping cart microformat and control elements among its descendants
- product-title - The name of the product
- product-price - The price of the product
- product-image - An image of the product
- product-url - A URL related to this product (product details, etc.)
- product-weight - US merchants onlyThe weight of the product in pounds, other units are not supported. (for use with carrier calculated shipping)
- product-shipping - The per unit shipping cost of this item
- product-shipping-first - Shipping cost for the first product in the cart. The maximum product-shipping-first over all products in the cart will be used and the product-shipping for first such product will not be added to the total shipping cost. Seeusing shippingfor more details.
- product-digital - If this class appears on any node in a product, then that product is treated as digital content. The buyer is not asked for a shippingaddress if the cart contains only digital products.
- product-attr-XXX - whereXXXis the name of this additional attribute
- Order Information - This information is tracked for each order. Please note that the Order Information fields are only reported for the Order Confirmed page.
- order-id - This value is the unique number that Google assigns to the order. This value does not appear in a Checkout API request.
- affiliation - This value is left blank in Analytics reports for Google Checkout pages.
- total - This value is the total cost of the order.
- tax - This value is the total tax amount charged for the order.
- shipping - This value is the total shipping amount charged for the order.
- city - This value identifies the city of the order's shipping address.
- state/region - This value identifies the state or region of the order's shipping address.
- country - This value identifies the country of the order's shipping address.
- Item Information - This information is tracked for each item in the order.
- order-id - This value is the unique number that Google assigns to the order. This value does not appear in a Checkout API request.
- sku/code - This value is left blank in Google Analytics reports.
- product name - This value contains the <item-name> provided for the item in the Checkout API request.
- category - This value is left blank in Analytics reports for Google Checkout pages.
- price - This value is the per-unit price for the item. It contains the <unit-price> provided for the item in the Checkout API request.
- quantity - This value identifies the number of units of a particular item that is included in the order. The value contains the <quantity> provided for the item in the Checkout API request.
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
- Summary of common patterns discovered
- Other attempts to solve The Problem
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:
- Page Name (for reference in reports vs. the URL)
- Page type, channel or categorisation
- Promo/Campaign ID
- Technographics (Browser, Referrer, Plugins, etc)
- Custom name/value pairs or tags
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:
- Is a customer/logged in
- IP Address, IP ISP, IP Company
- Email Response
- Credit Card held
- Purchase History (last X online purchase baskets by session, date/time)
- Storecard/reward card held
- Custom name/value pairs or tags
Proposal
- Early drafts
- Link to related pages as they become available
- -brainstorming
- - proposal
- -microformat