<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Analytics Talk &#187; Tracking posts &#8211; Analytics Talk</title>
	<atom:link href="http://cutroni.com/blog/category/tracking/feed/" rel="self" type="application/rss+xml" />
	<link>http://cutroni.com/blog</link>
	<description>Untangling the world of web analytics</description>
	<lastBuildDate>Wed, 25 Jan 2012 17:48:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
	<atom:link rel='hub' href='http://cutroni.com/blog/?pushpress=hub'/>
		<item>
		<title>5 Google Analytics Custom Variables for Ecommerce</title>
		<link>http://cutroni.com/blog/2011/06/14/5-google-analytics-custom-variables-for-ecommerce/</link>
		<comments>http://cutroni.com/blog/2011/06/14/5-google-analytics-custom-variables-for-ecommerce/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 05:48:17 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[Tracking]]></category>
		<category><![CDATA[custom variables]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://cutroni.com/blog/?p=1812</guid>
		<description><![CDATA[I believe that every business can use Google Analytics custom variables. Especially ecommerce businesses. Custom variables inject new data dimensions that are crucial for segmentation. As analysts we need to do segmentation to understand user behavior. And ecommerce sites have certain unique behaviors that are not tracked with a basic Google Analytics implementation. For those [...]<p><a href="http://cutroni.com/blog/2011/06/14/5-google-analytics-custom-variables-for-ecommerce/">5 Google Analytics Custom Variables for Ecommerce</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2011/05/18/mastering-google-analytics-custom-variables/' rel='bookmark' title='Permanent Link: Mastering Google Analytics Custom Variables'>Mastering Google Analytics Custom Variables</a></li>
<li><a href='http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/' rel='bookmark' title='Permanent Link: Google Analytics Custom Variables Overview'>Google Analytics Custom Variables Overview</a></li>
<li><a href='http://cutroni.com/blog/2006/09/21/google-analytics-configuration-mistake-2-query-string-variables/' rel='bookmark' title='Permanent Link: Google Analytics Configuration Mistake #2: Query String Variables'>Google Analytics Configuration Mistake #2: Query String Variables</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I believe that every business can use Google Analytics custom variables. Especially ecommerce businesses. Custom variables inject new data dimensions that are crucial for segmentation. As analysts we need to do segmentation  to understand user behavior. And ecommerce sites have certain unique behaviors that are not tracked with a basic Google Analytics implementation.</p>
<p>For those that have not used custom variables before you can get read <a href="http://cutroni.com/blog/2011/05/18/mastering-google-analytics-custom-variables/">Mastering Custom Variables</a> for overview.</p>
<p>Now on to the custom variables!</p>
<p><strong>Tracking Coupon Codes and Promotional Codes</strong><br />
<img src="http://cutroni.com/blog/wp-content/uploads/coupon-300x245.jpg" alt="Tracking Coupon Codes with Google Analytics" title="Tracking Coupon Codes with Google Analytics" width="300" height="245" class="alignright size-medium wp-image-1816" /><br />
I think this is a pretty obvious use of custom variables. If you sell something you probably run various promotions. And you need to track these promotions to see how they perform. Some promotions can be tracked using campaign tracking. I&#8217;ve seen lots of people use the utm_content parameter to identify the promotion in a marketing campaign, like an email. But a custom variable works just as well.</p>
<p>When coming up with a strategy think about how you might scale this as time goes on. Do you want all of your promotional codes aggregated together under one variable? You could do something like this:</p>
<p><code>_gaq.push(['_setCustomVar',1,'PromoCode','&lt;PROMO CODE ID&gt;',3]);</code></p>
<p>Or you could get fancy and use different custom variables to bucket groups of promotions, like seasonal promotions. For example, if you lots of promotions during the holiday season you might want to create a custom variable named HolidayPromos and then a unique name for each of the codes, something like this:</p>
<p><code>_gaq.push(['_setCustomVar',1,'HolidayPromo','Free2DayShip',3]);<br />
_gaq.push(['_setCustomVar',1,'HolidayPromo','FreeWrapping',3]);<br />
_gaq.push(['_setCustomVar',1,'HolidayPromo','10perOff',3]);</code></p>
<p>The above code would need to appear on your receipt page. And remember, the slot, or index, in the code above may be different for you. It all depends on your use of custom variables.</p>
<p>You might be wondering why I decided to go with a page level custom variable here. Remember, Google Analytics will sessionize a page level custom variable. So even though the custom var will only fire on the receipt page the data will be applied to the entire visit. </p>
<p><strong>Tracking Payment Method</strong></p>
<p>Remember, we study visitor behavior to understand the impact on business. One of these behaviors is how people pay for a purchase. Is there a difference between a visitor who pays with a credit card vs one who pays with PayPal? Does one spend more, on average, than the other? You&#8217;ll never know unless you capture payment type and review metrics like average order value and conversion rate.</p>
<p>To capture payment type use a page level custom variable. The resulting GA code will look something like this:</p>
<p><code>_gaq.push(['_setCustomVar',2, 'PaymentType','&lt;NAME OF PAYMENT&gt;',3]);</code></p>
<p>Don&#8217;t forget to replace <code>&lt;PAYMENT TYPE&gt;</code> with the customer&#8217;s payment method.</p>
<p><strong>Tracking Shipping Method</strong></p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/shipping.jpg" alt="Why not tracking shipping method with Google Analytics?" title="Why not tracking shipping method with Google Analytics?" width="300" height="300" class="alignright size-full wp-image-1817" /><br />
Like payment method, it&#8217;s interesting to see what shipping method people choose with various products. Why? Perhaps people who buy certain products choose certain types of shipping. If so, maybe you can build a new promotion using this information. Could there be no insights here? ABSOLUTELY! But you&#8217;ll never know unless you have some data and do a bit of analysis.</p>
<p><code>_gaq.push(['_setCustomVar',3,'CustType','Repeat',1]);</code></p>
<p><strong>Tracking Repeat Customers</strong></p>
<p>I remember reading Eric Peterson&#8217;s book <a href="http://www.amazon.com/Web-Analytics-Demystified-Marketers-Understanding/dp/0974358428">Web Analytics Demystified</a> a looong time ago. Besides being one of the first books on analytics it was exceedingly actionable. One of the ecommerce key performance indicators Eric talked about, and rightfully so, was the repeat-buyers. </p>
<p>The behavior of repeat customers is different than first time customers. This segment of customers usually takes less time to purchase due to a knowledge of your products and services.  Normally it costs you less money to get these people to convert. So it&#8217;s a good idea to understand what marketing they respond to and how they use your website.</p>
<p>To track repeat customers in Google Analytics you must use a visitor scope custom variable. Remember a visitor scoped custom variable persists on the visitor&#8217;s computer as a cookie. The trick is when you set the custom variable. </p>
<p>Most people think you can set the custom variable when the transaction happens, like this:</p>
<p><code>_gaq.push(['_setCustomVar',4,'CustType','Repeat',1]);</code></p>
<p>But in reality this will not work. When you set a visit level custom variable the value gets applied to the <strong>CURRENT</strong> visit and all future visits. So you need to wait until the <strong>SECOND</strong> purchase before setting the above custom variable. Then it should work just fine.</p>
<p>[<strong>UPDATE: </strong>Elizabeth Brings up a good point in the comments. This method will only work if the visitor comes back and makes a second purchase on the site. You can tweak the above logic and set the custom variable on the visitor's return to the website, rather than when they make a second purchase. While this is not perfect it is a workaround.]</p>
<p>I should note that this is an AWESOME custom variable to use in an advanced segment. Actually, they&#8217;re all great to use in Advanced segments, but segmenting repeat buyers is especially useful</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/Screen-shot-2011-06-12-at-8.36.11-PM.png" alt="Creating a customer segment in Google Analytics" title="Creating a customer segment in Google Analytics" width="732" height="460" class="aligncenter size-full wp-image-1824" /></p>
<p><strong>Purchase History</strong></p>
<p>This is where things get a little more complicated. Tracking things like purchase history requires a bit of configuration on the server side, meaning you or your nerds need to create some code to categorize customers based on the number of purchases they&#8217;ve made in the past. Rather than track every single purchase I prefer to bucket the purchases, like this:</p>
<ul>
<li>1 to 3 purchases</li>
<li>4 to 6 purchases</li>
<li>7 + purchases</li>
</ul>
<p>You need to have the logic on the server to review the custom&#8217;er purchase history and set the custom variable accordingly. The GA JavaScript will look something like this:</p>
<p><code>_gaq.push(['_setCustomVar',5,'PurchHistory','1-3',1]);</code></p>
<p>Now you&#8217;re probably thinking that there is some duplication with the previous custom variable, and you&#8217;re right. The repeat customer variable is a bit more generic and gives you a quick view of new and returning customers. The purchase history variable is geared towards deeper analysis of customer behavior.</p>
<p>So there you have it, five custom variables for ecommerce websites. This is by no means an exhaustive list, but I think these can help any commerce based business to better segmentation and analysis. </p>
<p>Are you using custom variables on your ecommerce website? If so I&#8217;d love to hear how!</p>
<p><a href="http://cutroni.com/blog/2011/06/14/5-google-analytics-custom-variables-for-ecommerce/">5 Google Analytics Custom Variables for Ecommerce</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2011/05/18/mastering-google-analytics-custom-variables/' rel='bookmark' title='Permanent Link: Mastering Google Analytics Custom Variables'>Mastering Google Analytics Custom Variables</a></li>
<li><a href='http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/' rel='bookmark' title='Permanent Link: Google Analytics Custom Variables Overview'>Google Analytics Custom Variables Overview</a></li>
<li><a href='http://cutroni.com/blog/2006/09/21/google-analytics-configuration-mistake-2-query-string-variables/' rel='bookmark' title='Permanent Link: Google Analytics Configuration Mistake #2: Query String Variables'>Google Analytics Configuration Mistake #2: Query String Variables</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2011/06/14/5-google-analytics-custom-variables-for-ecommerce/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Mastering Google Analytics Custom Variables</title>
		<link>http://cutroni.com/blog/2011/05/18/mastering-google-analytics-custom-variables/</link>
		<comments>http://cutroni.com/blog/2011/05/18/mastering-google-analytics-custom-variables/#comments</comments>
		<pubDate>Wed, 18 May 2011 12:39:43 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tracking]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[custom variables]]></category>
		<category><![CDATA[implementation]]></category>

		<guid isPermaLink="false">http://cutroni.com/blog/?p=1670</guid>
		<description><![CDATA[I&#8217;ve got a stack of posts that I want to write, and realized that the all deal with Custom Variables. So, to make sure that we&#8217;re all on the same page when it comes to custom vars, here&#8217;s my guide to Mastering Google Analytics Custom Variables. For those of you that have not used custom [...]<p><a href="http://cutroni.com/blog/2011/05/18/mastering-google-analytics-custom-variables/">Mastering Google Analytics Custom Variables</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/' rel='bookmark' title='Permanent Link: Google Analytics Custom Variables Overview'>Google Analytics Custom Variables Overview</a></li>
<li><a href='http://cutroni.com/blog/2006/09/21/google-analytics-configuration-mistake-2-query-string-variables/' rel='bookmark' title='Permanent Link: Google Analytics Configuration Mistake #2: Query String Variables'>Google Analytics Configuration Mistake #2: Query String Variables</a></li>
<li><a href='http://cutroni.com/blog/2006/07/25/custom-segmentation-with-google-analytics/' rel='bookmark' title='Permanent Link: Custom Segmentation with Google Analytics'>Custom Segmentation with Google Analytics</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a stack of posts that I want to write, and realized that the all deal with Custom Variables. So, to make sure that we&#8217;re all on the same page when it comes to custom vars, here&#8217;s my guide to Mastering Google Analytics Custom Variables.</p>
<p>For those of you that have not used custom variables, CVs are a way for you to insert custom data into Google Analytics. What kid of custom data? Almost any kind of data. As long as the data is available to you in the source code of a web page you can pass it to Google Analytics via a custom variable.</p>
<p>There are 4 parts to a custom variable:</p>
<p>1. The name of the variable<br />
2. The values for each variable<br />
3. The index or slot of the variable and the scope of the variable<br />
4. The scope of the variable</p>
<p><strong>Name &amp; Value</strong></p>
<p>Custom variables are name-value pairs of data. The name is also called the &#8220;key&#8221;. To create a custom variable you define the name of a custom variable, like Favorite Baseball Team, and then assign it different values, Red Sox, Braves, Giants, etc.</p>
<p>Google Analytics will show you a list of all the custom variable names in a list and then let you drill down into the list and see all of the values.</p>
<p>Here&#8217;s an example. I use a custom var named &#8220;Year&#8221; to track the publication year for all my posts on this blog. I can view which year had the most popular content by finding &#8220;Year&#8221; in the Visitors &gt; Demographic &gt; Custom Variables report.</p>
<p><img class="aligncenter size-full wp-image-1791" title="Google Analytics custom variables report" src="http://cutroni.com/blog/wp-content/uploads/Screen-shot-2011-05-16-at-10.21.36-PM.png" alt="Google Analytics custom variables report" width="778" height="256" /></p>
<p>Then I can click on &#8220;Year&#8221; to a get a list of all the values:</p>
<p><img class="aligncenter size-full wp-image-1792" title="Values for a Google Analytics Custom Variable" src="http://cutroni.com/blog/wp-content/uploads/Screen-shot-2011-05-16-at-10.23.56-PM.png" alt="Values for a Google Analytics Custom Variable" width="779" height="365" /></p>
<p>Custom variables can also be used in custom reports and advanced segments. The name of the custom variable becomes the &#8220;Key&#8221; dimension and the value of the custom variable becomes the &#8220;Custom Variable Value&#8221; dimension.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/Screen-shot-2011-05-18-at-8.18.09-AM.png" alt="Google Analytics Custom Variable Dimensions" title="Google Analytics Custom Variable Dimensions" width="190" height="254" class="alignright size-full wp-image-1800" /></p>
<p><strong>Index or Slot</strong></p>
<p>The index is a way to organize your custom variables. Index is also referred to as &#8220;slot&#8221;. At a basic level, you get 5 custom variables. But this can actually be misleading. Think of the index as a parking lot with 5 parking space. You can put or &#8220;park&#8221; a custom variable in each space.</p>
<p>You can technically have more than 5 custom variables, but we need to discuss the next concept, scope, and how it impacts the index.</p>
<p><strong>Scope</strong></p>
<p>The key to mastering custom variables is understanding the scope. The scope of a custom variables determine how long the custom variable will persist.</p>
<p>If we use the parking lot analogy, the scope determines how long a car will stay parked in the custom variable parking lot.</p>
<p>There are three different scopes for Google Analytics Custom Variables:</p>
<p><em>Page Level: A page level custom variable will only persist for as the visitor is viewing the page where the custom variable has been set. Once the visitor moves to a new page the custom variable will expire.</em></p>
<p><em>Visit Level: A visit level custom variable will persist for the visitor&#8217;s entire visit. Once the visit ends the custom variable will expire.</em></p>
<p><em>Visitor Level: A visitor level custom variable will persist for 24 months as a cookie on the visitor&#8217;s machine until the visitor deleted her cookies.</em></p>
<p>Where scope really gets complicated is when we use it with the index. Remember, you have 5 slots that can hold a custom variable. Once you place a custom var in a slot that <em>SLOT BECOMES FILLED</em> and you can not place another custom var into the slot.</p>
<p>Scope and index work in tandem to determine how many custom variables you have available at any given time.</p>
<p>Let&#8217;s start with a visitor level custom variable.</p>
<p><img class="alignright size-medium wp-image-1795" title="Google Analytics Custom Variables: Index or Slot" src="http://cutroni.com/blog/wp-content/uploads/ParkingLot1-300x225.jpg" alt="Think of the index as a parking lot with 5 spaces." width="300" height="225" /></p>
<p>When you place a visitor level custom var in a slot that slot remains filled until you delete the custom var. Remember a visitor level var is stored as a cookie so you have to actually delete the cookie. So, if you set a visitor scoped custom variable in slot 1 you can NEVER use slot one again. Unless you want to erase the custom var you set in slot 1.</p>
<p>Every time the visitor comes back to your website slot 1 will be filled because there is a cookie (named __utmv) on the visitor machine.</p>
<p><span style="color: #339966;"><em>PARKING ANALOGY:</em> There is a car in parking space 1. The car has no tires&#8230; and no engine&#8230; it&#8217;s not going anywhere soon&#8230; unless it gets towed.</span></p>
<p>When you create a visit level custom variable and place it in a slot, that slot remains full for the entire visit. Once the visit ends that slot opens up and you can place another variable in that slot.</p>
<p>Unlike the visitor scope custom variable there is no cookie. So when the visitor comes back to your site that slot is open.</p>
<p><span style="color: #339966;"><em>PARKING ANALOGY:</em> There is a car in a parking space 1, but just for the day. The spot will be vacated at the end of the day and someone else can park there.</span></p>
<p>When you create a page level custom variable and place it in a slot that slot remains filled until the visitor moves to another page. Once the visitor moves to another page the slot opens up and you can place another variable in the slot.</p>
<p><span style="color: #339966;"><em>PARKING ANALOGY:</em> There is a car in a parking space 1, but someone is just running into a store. The engine is idling and the spot will open up in 5 minutes.</span></p>
<p>Let&#8217;s look at a couple of examples:</p>
<p><span style="color: #993300;">Example 1:</span> A visitor on a news site logs in. I set 5 visitor scoped custom variables. This means that whenever the visitor comes back to the website ALL five slots are filled. I can never use any other custom variables unless I erase or over-write one of the existing variables.</p>
<p><span style="color: #993300;">Example 2:</span> A visitor is on a blog. Each blog post is categorized 3 ways using a page level custom variable. on every page I set the same 3 custom variables. When a visitor logs in I set a visitor custom variable to identify them as a member. So now I have 3 page level variables and one visitor level variable. The slot that contains the visitor level variable will always remain full, so I need to make sure that I always place my page level variables in the same slots.</p>
<p><span style="color: #993300;">Example 3:</span> A visitor logs into a news site. I set 5 page level custom variables when they log in to record various pieces of information about their membership. One the next page I fire of 5 different custom variables to record information about their past browsing history. In this senario I have actually set 10 custom variables. How? Because they are all page level custom variables. The slots associated with a page level custom var open up when the visitor moves to a new page.</p>
<p>Hopefully this explains how you can technically have more than 5 custom variables.</p>
<p><strong>The Code</strong></p>
<p>Like everything else in Google Analytics, you implement Custom Variables using JavaScript. All of the topics we discussed above, index, name, value and scope, are all part of the JavaScript.</p>
<p>Here&#8217;s the standard Async code snippet:</p>
<p><code>_gaq.push('_setCustomVar',index,'name','value', scope);</code></p>
<p>The index is a number, from 1 through 5.</p>
<p>The scope is also a number. A value of 1 indicates a visitor scoped custom variable, a value of 2 indicates a visit level custom variable, and a value of 3 indicates a page level custom variable.</p>
<p>The name and the value are just plain text. Whatever you enter into the code above will be pulled into Google Analytics.</p>
<p>Where do you put this code? That&#8217;s the hard part. You place this code when you want to create a custom variable. You may want to categorize all of the pages on your site using a page level custom variable. In this case you might place the custom var code in the standard GA code snippet, like this:</p>
<p><code>&lt;script type="text/javascript"&gt;// &lt;![CDATA[<br />
   var _gaq = _gaq || [];<br />
   _gaq.push(['_setAccount', 'UA-XXXXXX-1']);<br />
   _gaq.push(['_setCustomVar',1,'PageCategory','Sports', 3]);<br />
   _gaq.push(['_trackPageview']);   </p>
<p>(function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();<br />
// ]]&gt;<br />
&lt;/script&gt;</code></p>
<p>Or, if you&#8217;re going to identify someone as a &#8216;member&#8217; of your site, you might place the code on a page after the visitor logs in. Like this:</p>
<p><code>&lt;script type="text/javascript"&gt;// &lt;![CDATA[<br />
   var _gaq = _gaq || [];<br />
   _gaq.push(['_setAccount', 'UA-XXXXXX-1']);<br />
  _gaq.push(['_setCustomVar',1,'VisitorType','Member', 1]);<br />
  _gaq.push(['_trackPageview']);   </p>
<p>(function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();<br />
// ]]&gt;<br />
&lt;/script&gt;</code></p>
<p>But you can also attach the code to visitor action, like <code>onClick</code> events.</p>
<p>You can also create custom variables for mobile devices using the <a href="http://code.google.com/mobile/analytics/docs/#mobilesdks">iOS SDK and the Android SDK</a>. How cool is that!</p>
<p>And some of the super nerds I work with at <a href="http://cardinalpath.com">Cardinal Path</a> have been able to hack custom variables and set them using the Google Analytics Mobile Tracking code for low-end mobile devices.</p>
<p>Regardless of the platform that you&#8217;re tracking, you can probably use a custom variable.</p>
<p><strong>Super Nerd Stuff</strong></p>
<p>Custom variables are not without their limitations and oddities. Here are a few things you need to be aware of when implementing:</p>
<p>1. What happens if you place a custom variable in a slot that is already filled? The last value placed in the slot is applied to the visit.</p>
<p>2. Custom variables are sent to Google using the same invisible image request. In the old days (ie two months ago) the size of this request was limited to 2048 characters by the browser. Because this limitation can really restrict data collection, Google decided to limit the size of your custom variable. This means that the name &#8211; value combination must be less than 64 characters. I know, this sucks.</p>
<p>BUT, Google has since changed how it collects data. The size of the image request is now 8000 + characters. So, in theory, Google could kill the 64 character CV limit. But they have not&#8230;</p>
<p><del datetime="2011-06-14T13:56:41+00:00">3. Custom Variable processing lags the standard data processing by about 24 hours. However, if you add a custom variable to a custom report it will be visible. I know, completely weird.</del> This is really only for very, very big sites, where data processing can lag in general.</p>
<p>4. Page level custom variables are more-or-less the same as an event. When you create an Advanced Segment using a page-level custom variable, GA will return the number of visits that included that custom var. So, if you don&#8217;t have enough slots available you may want to consider using an event.</p>
<p>5. When you set a custom variable the data is sent immediately back to Google Analytics via an image request. This means that if you set a custom variable, on the last page of a visit and AFTER the pageview is recorded, that custom variable will NOT be collected by Google Analytics. If you can, put your custom variable code BEFORE <code>_trackPageview()</code>.</p>
<p>That&#8217;s ALL I have to say about custom variables. Hopefully this gives you a good baseline understanding of how they work and how to implement them.</p>
<p>If you&#8217;re using custom variables leave a comment. I&#8217;d love to hear how you&#8217;re using them.</p>
<p><a href="http://cutroni.com/blog/2011/05/18/mastering-google-analytics-custom-variables/">Mastering Google Analytics Custom Variables</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/' rel='bookmark' title='Permanent Link: Google Analytics Custom Variables Overview'>Google Analytics Custom Variables Overview</a></li>
<li><a href='http://cutroni.com/blog/2006/09/21/google-analytics-configuration-mistake-2-query-string-variables/' rel='bookmark' title='Permanent Link: Google Analytics Configuration Mistake #2: Query String Variables'>Google Analytics Configuration Mistake #2: Query String Variables</a></li>
<li><a href='http://cutroni.com/blog/2006/07/25/custom-segmentation-with-google-analytics/' rel='bookmark' title='Permanent Link: Custom Segmentation with Google Analytics'>Custom Segmentation with Google Analytics</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2011/05/18/mastering-google-analytics-custom-variables/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Merging Google Analytics with your Data Warehouse</title>
		<link>http://cutroni.com/blog/2011/05/05/merging-google-analytics-with-your-data-warehouse/</link>
		<comments>http://cutroni.com/blog/2011/05/05/merging-google-analytics-with-your-data-warehouse/#comments</comments>
		<pubDate>Fri, 06 May 2011 01:37:24 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[Tracking]]></category>
		<category><![CDATA[Web Analytics]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[business intelligence]]></category>
		<category><![CDATA[data integration]]></category>

		<guid isPermaLink="false">http://cutroni.com/blog/?p=1760</guid>
		<description><![CDATA[Many of the projects that I&#8217;ve been working on over the last 6 to 9 months have evolved to include more and more data integration. Specifically companies are looking to import more Google Analytics data into other systems to do various types of analysis. Data integration is nothing new, companies have been doing it for [...]<p><a href="http://cutroni.com/blog/2011/05/05/merging-google-analytics-with-your-data-warehouse/">Merging Google Analytics with your Data Warehouse</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2008/10/28/adding-business-data-to-google-analytics-data/' rel='bookmark' title='Permanent Link: Adding Business Data to Google Analytics Data'>Adding Business Data to Google Analytics Data</a></li>
<li><a href='http://cutroni.com/blog/2007/11/06/make-ga-data-quality-suck-less/' rel='bookmark' title='Permanent Link: Make GA Data Quality Suck Less!'>Make GA Data Quality Suck Less!</a></li>
<li><a href='http://cutroni.com/blog/2007/03/05/an-analysis-of-my-data/' rel='bookmark' title='Permanent Link: An Analysis of My Data'>An Analysis of My Data</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Many of the projects that I&#8217;ve been working on over the last 6 to 9 months have evolved to include more and more data integration. Specifically companies are looking to import more Google Analytics data into other systems to do various types of analysis. </p>
<p>Data integration is nothing new, companies have been doing it for a long time. I&#8217;ve written in the past about <a href="http://cutroni.com/blog/2009/03/18/updated-integrating-google-analytics-with-a-crm/">integrating Google Analytics with CRM data</a>. </p>
<p>Other analytics vendors have been supporting this functionality for a while. But I think as more organizations move to Google Analytics they&#8217;re looking to get the same functionality as their other tools. Hence this uptick in data integration. </p>
<p>So I figured this would be a good time for a high-level overview of the most common way to integrate Google Analytics with a data warehouse.</p>
<p><strong>What is a Data Warehouse?</strong></p>
<p>In reality a <a href="http://en.wikipedia.org/wiki/Data_warehouse">data warehouse</a> is just a big database that pulls from lots of different sources. A businesses would build a data warehouse to do more complex types of analysis. Other types of data you might find in a data warehouse is customer data, purchase history information or demographic information.</p>
<p>When all of this data is put together you can do some interesting types of analysis. For example, you can do better analysis about online behavior and offline conversion. Or tie long-term purchase history to online behavior.</p>
<p><a href="http://cutroni.com/blog/wp-content/uploads/database.jpg"><img src="http://cutroni.com/blog/wp-content/uploads/database.jpg" alt="" title="Designing your data warehouse." width="418" height="287" class="aligncenter size-full wp-image-1784" /></a></p>
<p>Another benefit of building a data warehouse is the ability to create very custom marketing segments. Adding information about conversion behavior and marketing activities can help augment historical sales data and create new marketing programs.</p>
<p>Gary Angel wrote a great post on some of the reason <a href="http://semphonic.blogs.com/semangel/2010/06/further-thoughts-on-data-warehousing.html">why you would want to build a data warehouse</a>. Avinash Kaushik also wrote an <a href="http://www.kaushik.net/avinash/2010/03/ten-fundamental-web-analytics-truths.html">interesting counter-point, why you might not want to build a data warehouse</a>.</p>
<p>My opinion, this is very useful, but do it in an agile, flexible way that does not take years. This stuff changes too fast to rebuild.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/primary_key.png" alt="" title="Adding a primary key to Google Analytics" width="183" height="100" class="alignright size-full wp-image-1782" /></p>
<p>Almost all data integration projects revolve around a primary key. A primary key is a unique number that exists in different data sets. Because this number exists in multiple data sets you can connect the data sets using the key.</p>
<p>To add Google Analytics data to a data warehouse you need to add some type of primary key to Google Analytics. In most of the work that I&#8217;ve done this key is a visitor ID. This <em>anonymous</em> identifier usually comes from some other system like a CRM.</p>
<p>When we add the customer ID to Google Analytics we store in a visitor scoped <a href="http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/">custom variable</a>. This means that the ID is stored in a cookie on the visitor&#8217;s machine. We normally set the cookie when the visitor makes a purchase or logs into the site. Basically any time we can positively identify the visitor.</p>
<p>For the sake of this example I&#8217;m going to use a little piece of JavaScript to create a unique ID for visitors. I&#8217;m actually going to extract a unique ID from the Google Analytics __utma cookie. Then I&#8217;m going to set the unique ID in a custom variable, specifically in Custom Variable slot 5.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/Screen-shot-2011-05-04-at-10.03.34-PM.png" alt="" title="How to set a visitor ID in a Google Analytics custom variable." width="432" height="57" class="aligncenter size-full wp-image-1763" /></p>
<p><em>NOTE: The function<code> _ugc()</code> is a generic function that get&#8217;s a cookie value. In this case it&#8217;s extracting part of the <code>__utma</code> cookie.</em></p>
<p>Once the ID is in the custom variable we should start to see data in Google Analytics, specifically the Custom Variables report. Here&#8217;s the custom var:</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/Screen-shot-2011-05-04-at-9.57.39-PM.png" alt="" title="A visitor ID in a Google Analytics Custom Variable" width="783" height="189" class="aligncenter size-full wp-image-1761" /></p>
<p>And here are all the visitor IDs:</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/Screen-shot-2011-05-04-at-9.57.24-PM.png" alt="" title="Visitor IDs in a Google Analytics Custom Variable" width="779" height="263" class="aligncenter size-full wp-image-1762" /></p>
<p>I know what you&#8217;re thinking, &#8220;You can&#8217;t store personally identifiable information in Google Analytics!&#8221; But this isn&#8217;t personally identifiable information. And besides, this is the same as the transaction ID stored in the ecommerce data.</p>
<p>Now that we&#8217;re done debating PII, we need to merge this data with other data. This is where things get complicated. The rest of the process is all programming. And all the programming is custom. The language you use, how you store the data, it all depends on your IT department and their platform of choice. The rest of this post is meant to be a high-level overview. </p>
<p>First, let&#8217;s extract the data from GA via the API. </p>
<p>This query will generate a list of all the unique IDs stored in the custom variable. The key dimension in this query is ga:customVarValue5, that&#8217;s the value of the Custom Variable in slot 5 which holds the IDs. I&#8217;m using the <a href="http://code.google.com/apis/analytics/docs/gdata/gdataExplorer.html">Data Feed Query Explorer</a> to test these queries.</p>
<p>The basic query is something like this:</p>
<p><code>https://www.google.com/analytics/feeds/data?<br />
ids=XXXXXXXXX&amp;<br />
dimensions=ga:customVarValue5&amp;<br />
metrics=ga:visits&amp;<br />
start-date=2011-04-20&amp;<br />
end-date=2011-05-04&amp;<br />
max-results=50</code></p>
<p>And the data coming back would look something like this:</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/Screen-shot-2011-05-04-at-10.26.50-PM.png" alt="" title="A list of unique IDs from Google Analytics" width="742" height="120" class="aligncenter size-full wp-image-1765" /></p>
<p>So where do you put this query? You need to create some type of code that runs automatically. You might pull data from Google Analytics daily or weekly. It all depends on the volume of your data and your specific needs.</p>
<p>Once I have a list of IDs I can create some looping logic, again part of an automated program, that iterates over the list of IDs and makes an API request for each ID number found above. This second query will get detailed information about each individual ID. </p>
<p>The secret to the second query is adding a custom segment that includes the ID number. Look for 1041533899 in the query below. That&#8217;s the ID number I pulled from the first API call above.</p>
<p><code>https://www.google.com/analytics/feeds/data?<br />
ids=XXXXXXXXXXX&amp;<br />
dimensions=ga:customVarValue5,ga:date,ga:source,ga:medium,ga:keyword,ga:pagePath&amp;metrics=ga:visits&amp;<br />
<strong>segment=dynamic::ga:customVarValue5==1041533899&amp;</strong><br />
start-date=2011-04-20&amp;<br />
end-date=2011-05-04&amp;<br />
max-results=50</code></p>
<p>With this query I&#8217;m getting the data, the traffic source, keyword and all pages that the visitor viewed. I could also pull things like revenue, conversions&#8230; But I&#8217;m looking for data that I don&#8217;t already have via some other system. So I would stick to things that are happening on the site, like where the visitor came from and what they did on the site (watch a video, use a calculator, etc.)</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/Screen-shot-2011-05-05-at-9.35.04-AM.png" alt="" title="Visitor information from the Google Analytics API" width="930" height="119" class="aligncenter size-full wp-image-1770" /></p>
<p>Once this query comes back it&#8217;s time to do the data integration. You might want to manipulate the data before you store it in a database or you might choose to insert the raw data. Again, a lot of this depends on your specific environment.</p>
<p>The important thing is that you now have the data. Integrate.</p>
<p><strong>Gotchas To Watch For</strong></p>
<p>There are some definite gotchas when implementing this type of soltion. Most notably, you need to <a href="http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFeed.html#largeDataResults">deal with data sampling</a> applied via the API. From the Google Analytics API docs:</p>
<blockquote><p>Google Analytics calculates certain combinations of dimensions and metrics on the fly. To return the data in a reasonable time, Google Analytics only processes a sample of the data. In these situations, the metric data returned in each entry includes a confidence interval. </p></blockquote>
<p>So massively huge data sets might need more frequent queries. Or you might need to break the data down into multiple profiles and then query it via the API. Again, this is what makes this type of solution so custom.</p>
<p>Another limitation is that each query is limited to a maximum of 7 dimensions  and 10 metrics. But you can get around that with some creative queries.</p>
<p>Thanks for sticking through this rather vague post. I know it lacks some detail, but this is a very specific technique that can differ from one client to another.</p>
<p><a href="http://cutroni.com/blog/2011/05/05/merging-google-analytics-with-your-data-warehouse/">Merging Google Analytics with your Data Warehouse</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2008/10/28/adding-business-data-to-google-analytics-data/' rel='bookmark' title='Permanent Link: Adding Business Data to Google Analytics Data'>Adding Business Data to Google Analytics Data</a></li>
<li><a href='http://cutroni.com/blog/2007/11/06/make-ga-data-quality-suck-less/' rel='bookmark' title='Permanent Link: Make GA Data Quality Suck Less!'>Make GA Data Quality Suck Less!</a></li>
<li><a href='http://cutroni.com/blog/2007/03/05/an-analysis-of-my-data/' rel='bookmark' title='Permanent Link: An Analysis of My Data'>An Analysis of My Data</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2011/05/05/merging-google-analytics-with-your-data-warehouse/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Faster, Better, Stronger. The GA Async Tracking Code</title>
		<link>http://cutroni.com/blog/2010/04/19/faster-better-stronger-the-ga-async-tracking-code/</link>
		<comments>http://cutroni.com/blog/2010/04/19/faster-better-stronger-the-ga-async-tracking-code/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 21:23:28 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[Tracking]]></category>

		<guid isPermaLink="false">http://cutroni.com/blog/?p=1468</guid>
		<description><![CDATA[You may have heard that Google will begin to use site speed when calculating web rankings. This generated a lot of buzz, but according to Matt Cutts, fewer than 1% of search queries are affected by the site speed signal in our implementation and the signal for site speed only applies for visitors searching in [...]<p><a href="http://cutroni.com/blog/2010/04/19/faster-better-stronger-the-ga-async-tracking-code/">Faster, Better, Stronger. The GA Async Tracking Code</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2007/10/16/gajs-new-google-analytics-tracking-code/' rel='bookmark' title='Permanent Link: GA.JS: New Google Analytics Tracking Code'>GA.JS: New Google Analytics Tracking Code</a></li>
<li><a href='http://cutroni.com/blog/2007/12/17/installing-gajs-with-aspnet/' rel='bookmark' title='Permanent Link: Updated GA.JS Tracking Code'>Updated GA.JS Tracking Code</a></li>
<li><a href='http://cutroni.com/blog/2007/03/19/tracking-clicks-with-ga-pt-1-about-urchintracker/' rel='bookmark' title='Permanent Link: Tracking Clicks with GA Pt. 1: About urchinTracker()'>Tracking Clicks with GA Pt. 1: About urchinTracker()</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You may have heard that Google will begin to use <a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html" target="_blank">site speed when calculating web rankings</a>. This generated a lot of buzz, but according to <a href="http://www.mattcutts.com/blog/">Matt Cutts</a>, </p>
<blockquote><p>fewer than 1% of search queries are affected by the site speed signal in our implementation and the signal for site speed only applies for visitors searching in English on Google.com at this point.&#8221;</p></blockquote>
<p>This may be the beginning of Google&#8217;s use of site speed. It&#8217;s probably a good idea to think about speed when designing your site.</p>
<p><strong>How GA can Slow Your Site</strong></p>
<p>One thing that can potentially slow your site down is the Google Analytics tracking code. Specifically, the <code>ga.js</code> library and how the browser loads the file.</p>
<p><img class="alignright size-medium wp-image-1475" title="You could wait for ga.js to load!" src="http://cutroni.com/blog/wp-content/uploads/waiting-199x300.jpg" alt="" width="199" height="300" /></p>
<p>When a browser renders a page it literally starts starts to display the HTML from the top of the page and moves to the botton. When it hits a JavaScript file, like <code>ga.js</code>, it requests the file from the remote server.</p>
<p>Then it waits.</p>
<p>And waits.</p>
<p>And waits.</p>
<p>Once the file has been pulled into the browser it continues to process the HTML.</p>
<p>You can see the issue here, the browser could wait a long time for the JavaScript file depending on the visitors proximity to the server, the visitor&#8217;s bandwidth, and a bunch of other factors most of which you can&#8217;t control.  Waiting for a page to render is a bad user experience. I know I don&#8217;t like to wait!</p>
<p>There&#8217;s a great example of how a remote file can make the browser slow down on the <a href="http://stevesouders.com/cuzillion/?ex=10008&amp;title=Scripts+Block+Downloads" target="_blank">High Performance website blog</a>.</p>
<p>Google tries to mitigate load-time issues by geo-loadbalancing <code>ga.js</code>, so the visitor&#8217;s browser will automatically contact the closest data center to load the <code>ga.js</code> faster.</p>
<p>It&#8217;s also best to place the <code>ga.js</code> at the bottom of your pages just in case there is an issue with the communication between the data center and the visitor&#8217;s browser. By placing the <code>ga.js</code> at the bottom of the page all of the content has already rendered, so the visitor won&#8217;t experience a blank or partially loaded pags.</p>
<p>While placing the GATC at the bottom of the page can mitigate some issues it can cause others.</p>
<p>First, it is possible for visitors to navigate away from the site before data is sent to Google Analytics. This leads to missing data.</p>
<p>Second, if you need to do any advanced tracking, like ecommerce or events, you may need to move the <code>ga.js</code> to the top of the page thus negating the benefit from putting it at the bottom of the page. This can also complicate your implementaiton because some pages may have the code at the top of the page and some might have the code at the bottom of the page which is a maintenance nightmare.</p>
<p>Using the new async code can help mitigate both of these problems.</p>
<p><strong>How the Async Code Helps</strong></p>
<p>First, The asyncronous version of the tracking code utilizes <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#scripting-1" target="_blank"> HTML 5 and the modern browser&#8217;s ability to load files asyncronously</a>. This means that the browser can load files like <code>ga.js</code> while it continues to render the page for the visitor.</p>
<p>Second, the async code let&#8217;s us send data to Google Analytics before the <code>ga.js</code> has loaded in the browser. Technically we&#8217;re not sending the data to Google, but we are executing the commands that generate the data. The broser just holds the commands until the <code>ga.js</code> has completely loaded. Then the commands are executed (in the order in which they were added) and the data is sent to Google.</p>
<p>In the old days (like last year) we had to wait for <code>ga.js</code> to load before we could call any GA code. Not any more.</p>
<p>So the Async code is a good thing.</p>
<p><img class="aligncenter size-medium wp-image-1488" title="Martha likes the Google Analytics Async Code" src="http://cutroni.com/blog/wp-content/uploads/martha-async-300x251.jpg" alt="" width="300" height="251" /></p>
<p>The big question is, <em>should you use the async tracking code?</em></p>
<p>Well, if you&#8217;re concerned that Google Analytics is slowing down your site, and that it may be impacting your search rankings, then yes, use the async code. There are a number of free tools that you can use to test how long it takes <code>ga.js</code> to load on your site. (<a href="http://developer.yahoo.com/yslow/">YSlow</a>, <a href="http://code.google.com/speed/page-speed/download.html">Page Speed</a>, etc.) Use them to determine if GA is slowing down your site.</p>
<p>If you decide to use the async version of the code there are a few things you should know. </p>
<p>Using the async code is slightly different than using the standard tracking code. Let&#8217;s look:</p>
<p><code>&lt; script&gt;<br />
//<br />
// This section creates the queue<br />
//<br />
var _gaq = _gaq || [];<br />
_gaq.push(['_setAccount', 'UA-XXXXX-X']);<br />
_gaq.push(['_trackPageview']);</p>
<p>//<br />
// This section calls the ga.js<br />
//<br />
(function() {<br />
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;<br />
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';<br />
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);<br />
})();<br />
&lt;/ script&gt;<br />
<!-- All sorts of really cool site content here... --></code></p>
<p>The async code can appear anywhere in a page. But it&#8217;s best to place it at the immediately after the opening BODY tag. This let&#8217;s you add commands to the queue as soon as the page starts to render.</p>
<p>Some of the GA documentaion states that you can place the code in the HEAD tag. But this can cause some JavaScript issues with IE6. If you have a lot of visitors that use IE6 don&#8217;t put the code in the HEAD tag.</p>
<p>If you&#8217;re still leary about putting the code at the top of the page you can split the tracking code into two sections. You can place the first part of the code at the top of the page and the second part, the calls the <code>ga.js</code>, at the bottom of the page.</p>
<p>While this let&#8217;s you add commands to the queue immediately it is still possible to miss some GA data becayse the <code>ga.js</code> will be the last thing the browser requests. But the choice is up to you.</p>
<p><strong>How the Code Works</strong></p>
<p>Digging into the code a bit more, the first thing you&#8217;ll notice is the call for the <code>ga.js</code> is the second part of the code. This is the opposite of the standard tracking code. The async tracking code begins by creating the queue to store commands. Then the tracking code calls Google&#8217;s servers for the <code>ga.js</code> file. </p>
<p>The great thing about the queue of commands is you can add things to the queue whenever you want, even if the <code>ga.js</code> has not finished loading. This is what makes it possible to add GA commands at the top of a page.</p>
<p>The second section of code is the request to Google&#8217;s servers for the <code>ga.js</code>. It&#8217;s the exact same <code>ga.js</code> that&#8217;s used in the standard tracking code, it&#8217;s just pulled into the browser in a different way. Notice the  <strong>ga.async=true</strong> part of the code? That&#8217;s the part that tells the browser it should load the code asyncronously. The browser not execute any commands in the queue until after the <code>ga.js</code> has loaded.</p>
<p>If you&#8217;ve got a basic site then all you need to do is add the async code to your pages and you&#8217;re good to go. You don&#8217;t need to worry about adding items to the que, etc.</p>
<p>But if you&#8217;re doing any advanced tracking, like virtual pageviews, events or ecommerce you need to know how to add items to the queue.</p>
<p><strong>How to Add Items to the Queue</strong></p>
<p>Adding items to the queue can be done a number of different ways. The easiest way is to &#8220;push&#8221; things onto the queue. This is done with the push command, as shown below.</p>
<p><code>_gaq.push(['_setAccount', 'UA-XXXXX-X']);<br />
_gaq.push(['_trackPageview']);</code></p>
<p>If you wanted to add an event to the click of a link you would push the command on to the queue like this:</p>
<p><code>&lt; a href="onClick='_gaq.push(['cat','act','label']);'"&gt;go red sox&lt; /a&gt;</code></p>
<p>Or, to create a virtual pageview you could push the command onto the queue like this:</p>
<p><code>&lt; a href="onClick='_gaq.push(['_trackPageview','/virtual/go-red-sox']);'"&gt;go red sox&lt; /a&gt;</code></p>
<p>You can also add mulitple commands to the queue at a time. But this is where things start to get technical, and I&#8217;m not going to go there :)</p>
<p>How you implement the code depends on your site, the commands you want to add and how much JS you know. To learn more about how to add commands check out the <a href="http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html">GA Code site</a>.</p>
<p><strong>Switching to the Async Code</strong></p>
<p>The complexity of migrating to the async tracking code depends on your site. If you&#8217;re not using any of the advanced GA features then migration can be as simple as swapping the tags.</p>
<p>But, if you are using advanced features, you&#8217;ll need to update all of the GA code on your site. Remeber, all the standard Google Analytics functionality in the <code>ga.js</code> exists in the async code. You just need to replicate your existing code in the async format. You can find an overview of the async code (written in nerd) as well as code examples, on the <a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html" target="_blank">Google Code site</a>.</p>
<p>Obviously the migration effort depends on the complexity of your implementation. But if you take your time and document your existing GA code and test your implementaiton thoroughly everything should go smoothly.</p>
<p>Have you tried the new async code? Got an experience you want to share? Leave a comment!</p>
<p><a href="http://cutroni.com/blog/2010/04/19/faster-better-stronger-the-ga-async-tracking-code/">Faster, Better, Stronger. The GA Async Tracking Code</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2007/10/16/gajs-new-google-analytics-tracking-code/' rel='bookmark' title='Permanent Link: GA.JS: New Google Analytics Tracking Code'>GA.JS: New Google Analytics Tracking Code</a></li>
<li><a href='http://cutroni.com/blog/2007/12/17/installing-gajs-with-aspnet/' rel='bookmark' title='Permanent Link: Updated GA.JS Tracking Code'>Updated GA.JS Tracking Code</a></li>
<li><a href='http://cutroni.com/blog/2007/03/19/tracking-clicks-with-ga-pt-1-about-urchintracker/' rel='bookmark' title='Permanent Link: Tracking Clicks with GA Pt. 1: About urchinTracker()'>Tracking Clicks with GA Pt. 1: About urchinTracker()</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2010/04/19/faster-better-stronger-the-ga-async-tracking-code/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Tracking Internal Campaigns with Google Analytics</title>
		<link>http://cutroni.com/blog/2010/03/30/tracking-internal-campaigns-with-google-analytics/</link>
		<comments>http://cutroni.com/blog/2010/03/30/tracking-internal-campaigns-with-google-analytics/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 09:00:34 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Campaign Tracking]]></category>
		<category><![CDATA[Tracking]]></category>
		<category><![CDATA[site search]]></category>

		<guid isPermaLink="false">http://cutroni.com/blog/?p=1356</guid>
		<description><![CDATA[Internal campaigns are marketing efforts that are run on your site and promote your products and services. Here&#8217;s an example from the Boton Red Sox site. They&#8217;re using ads on the homepage to promote ticket sales. Companies should track how people react to these campaigns and which ones are most successful. But what&#8217;s the best [...]<p><a href="http://cutroni.com/blog/2010/03/30/tracking-internal-campaigns-with-google-analytics/">Tracking Internal Campaigns with Google Analytics</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2009/09/08/tracking-ero-result-searches-in-google-analytics/' rel='bookmark' title='Permanent Link: Tracking Zero Result Searches in Google Analytics'>Tracking Zero Result Searches in Google Analytics</a></li>
<li><a href='http://cutroni.com/blog/2006/09/12/measuring-internal-site-search-with-google-analytics/' rel='bookmark' title='Permanent Link: Measuring Internal Site Search with Google Analytics'>Measuring Internal Site Search with Google Analytics</a></li>
<li><a href='http://cutroni.com/blog/2009/03/12/find-out-when-your-campaigns-suck-with-ga-custom-reports/' rel='bookmark' title='Permanent Link: Find Out When Your Campaigns Suck with GA Custom Reports'>Find Out When Your Campaigns Suck with GA Custom Reports</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Internal campaigns are marketing efforts that are run on your site and promote your products and services. Here&#8217;s an example from the Boton Red Sox site. They&#8217;re using ads on the homepage to promote ticket sales.</p>
<p><a href="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-1.png"><img class="aligncenter size-full wp-image-1383" title="Internal ticket sale campaign on RedSox.com" src="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-1.png" alt="" width="738" height="488" /></a></p>
<p>Companies should track how people react to these campaigns and which ones are most successful. But what&#8217;s the best way to do this with Google Analytics?</p>
<p>Some people use the standard campaign tracking to track internal campaigns. THIS IS INCORRECT AND SHOULD NEVER BE DONE.  Using the standard campaign tracking for internal campaigns will cause problems with your source data. So don&#8217;t do it!</p>
<p>There are a few correct ways to track internal campaigns. You could use <a href="http://cutroni.com/blog/2007/10/16/event-tracking-pt-1-overview-data-model/">Event Tracking</a>, <a href="http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/">Custom Variables</a> or Virtual Pageviews. But I like to use GA&#8217;s internal campaign tracking tool.</p>
<p>What? You&#8217;ve never seen or used the GA&#8217;s internal campaign tracker? It&#8217;s in the profile settings and it&#8217;s called Site Search tracking! Did I fool you ;)</p>
<p>Site Search can easily be configured to track internal campaigns. Let&#8217;s walk through the steps to set it up and then the data and analysis.</p>
<h2>Step 1: Create a New Profile</h2>
<p>Because we&#8217;re using Site Search for an unintended purpose it&#8217;s best to configure these settings on a new profile. It&#8217;s not possible to use Site Search for both tracking internal campaigns and internal site search within the same profile. You need to have a separate profile to track internal campaigns.</p>
<p><a href="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-2.png"><img class="aligncenter size-full wp-image-1384" title="New Google Analytics Profile for Internal Campaigns" src="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-2.png" alt="" width="392" height="69" /></a></p>
<h2>Step 2: Tag your Internal Campaigns</h2>
<p>Once you&#8217;ve created your new profile it&#8217;s time to tag your internal campaigns. Internal campaigns need to be tagged in a similar manner to external campaigns: you need to add query string parameterrs to your internal ad.</p>
<p>However, unlike external campaigns you do not use the standard link tagging parameters (<code>utm_campaign</code>, <code>utm_medium</code>, etc.). You get to make up your own parameters!</p>
<p>You can use one or two parameters for internal campaign tracking and you can name then anything you want. The reason you can use one or two parameters is that GA&#8217;s site search configuration uses two parameters, one for the search phrase and one for the search category.</p>
<p>Whatever you choose, make sure the parameters are not used for anything else.</p>
<p><em>TIP: Check your Top Content report for a complete list of your site&#8217;s query string parameters. Verify that the parameters you create are NOT in this list.</em></p>
<p>For the sake of this post I&#8217;ll use the parameter <code>icn</code> (shor for internal campaign name). This parameter will holds the name of the internal campaign. I&#8217;m going to use the following format for the value of the campaign name parameter</p>
<p><code>icn=[internal-campaign-name]</code></p>
<p>I mentioned that you can use two paramters. You don&#8217;t need to use two, but GA&#8217;s site search can be confiugured to track the internal site search phrase and a site search category. We&#8217;ll use the category paramter to track the internal campaign name.</p>
<p>I&#8217;m going to name the second paraeter <code>ici</code> (short for internal campaign info). Again make sure the parameter you&#8217;re using does not already exist. This second parameter let&#8217;s me collect details about the ad the visitor clicked on and the location of the ad.</p>
<p>Here&#8217;s a basic format:</p>
<p><code>ici=[ad-creative]_[location-on-the-page]</code></p>
<p>You can see that I&#8217;m stuffing a lot of information into the parameter. You can put whatever you want and GA will gladly suck it in. By adding more information we&#8217;ll get a granluar view of how the internal campaigns perform and which locations and variations lead to tbe most conversions.</p>
<p>If you don&#8217;t have different types of internal ads, or just don&#8217;t care about this level of detail, then you can ignore the add internal campaign info parameter. It blank, it&#8217;s up to you!</p>
<p>Now you need to define the values for all the ads. Thic can get messy if you&#8217;re running a lot of internal campaign. But you can do it, just be organized! Use a spreadsheet to keep track of all the values you use.</p>
<p>Once you&#8217;ve got al your parameters it&#8217;s time to tag your links. The exact process depends on your site. You may need to change static links, like this:</p>
<p>&lt; a href=&#8221;/internal-page.php?icn=2010-spring-sale&amp;ici=stubs_home-roller &gt;</p>
<p>Or if you have complicate flash ads you may need to get inside the Flash code. It depends on your site.</p>
<p>The bottom line is when somone clicks on an internal ad you want to see your internal campaign parameter on the next page. If you don&#8217;t see the parameter in the URL then you did something wrong.</p>
<p>You can use the sample spread sheet below to track the different parameters you use for your internal campaigns. The spread sheet also has a formula in column D to automatically add the parameters to your URLs.</p>
<p>NOTE: There is an iFrame in this post. If you can not see it, you can view the original post <a href="http://cutroni.com/blog/2010/03/29/tracking-internal-campaigns-with-google-analytics">here</a> or view the Google Spreadsheet <a href="http://spreadsheets.google.com/ccc?key=0AnmzEWCHMzUPdFpuRXJkOTZseW5KQVhRTUJmRUJWZlE&amp;hl=en">here</a>.</p>
<p>Once youe&#8217;ve got the parameters added to your links it&#8217;s itme to configure the Site Search settings.</p>
<h2>Step 3: Configure Site Search Settings</h2>
<p>Remeber, we&#8217;re configuring these settings on a new profile so we don&#8217;t break the site search in our main reporting profile.</p>
<p>Site search has three settings. First, turn site search on.</p>
<p>Next, tell GA the name of the paramter that holds the site search phrase (in this case it&#8217;s out internal campaign name) by adding the parameter to the &#8216;Query Parameter&#8217; filed.</p>
<p>Next, choose Strip Query String Parameters. This setting will remove the parameter from the URL after GA processes the data. This is a good idea because it reduces duplicate pages in your top content reports.</p>
<p><em>TIP: You probably want to exclude your internal campaign name parameter, and internal campaign information parameter, from your other profiles. It can really mess up your pageview data.</em></p>
<p>If you&#8217;re using an internal campaign information parameter configure the Site Search Category settings the same way. Just make sure you use your internal campaign info parameter in the &#8216;Category Parameter&#8217; setting.</p>
<p>Here&#8217;s how the settings look using the parameters from my example:</p>
<p><a href="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-3.png"><img class="aligncenter size-full wp-image-1387" title="Google Analytics Internal Site Search settings" src="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-3.png" alt="" width="497" height="327" /></a></p>
<p>That&#8217;s it! Let&#8217;s look at the data.</p>
<h2>The Reports</h2>
<p>Let&#8217;s start by answering a simple question: do people who respond to internal camapigns convert more or less than those that do not respond to internal camapigns? To answer this question use the Content &gt; Site Search &gt; Usage report. Here we can see that there were only eight visits that clicked an internal campaign. Sad! But it&#8217;s just test data.</p>
<p><img class="aligncenter size-full wp-image-1397" title="Success of Internal Campaigns" src="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-8.png" alt="" width="604" height="240" /></p>
<p>Now let&#8217;s drill deeper ad identify which inernal camapigns are most effective. Use the Content &gt; Site Search &gt; Search Terms report. Rather than search phrases this report contains the names of all internal campaigns. Again, what was the response to the campaign? Was it worth the effort? Don&#8217;t forget to check the Goals tab and the Ecommerce tabs (if applicable) to measure outcomes!</p>
<p><img class="aligncenter size-full wp-image-1398" title="Internal campaign in the Google Analytics Search Terms report." src="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-9.png" alt="" width="619" height="237" /></p>
<p>But let&#8217;s drill deeper to understand which ads within those campaigns are working. Click on a campaign name and choose Category from the Analyze drop down.</p>
<p><img class="aligncenter size-full wp-image-1399" title="Analyze a given internal campaign by the Category data" src="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-10.png" alt="" width="491" height="135" /></p>
<p>Now we&#8217;re looking at all of the information that we put into the <code>ici</code> query string parameter for this particular campaign name. If we had multiple internal ads we&#8217;d be able to differentiate ad placements and creative variations.</p>
<p><img class="aligncenter size-full wp-image-1422" title="Segmenting an internal campaign in Google Analytics." src="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-11.png" alt="" width="577" height="105" /></p>
<p>Don&#8217;t forget to use the Goals and Ecommerce tabs to measure outcomes! This is what most people want to know: did internal campaigns, and specifically which internal campaigns, generated <strong>revenue and conversions</strong>?</p>
<p>But we can do more. Now change to the Content &gt; Site Search &gt; Start Pages report. Now you can see which page people were on when they click on an internal ad. Again, more insight into where visitors responded to an internal campaign.</p>
<p><img class="aligncenter size-full wp-image-1415" title="How to identify start pages for Internal Campaigns." src="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-13.png" alt="" width="489" height="97" /></p>
<p>And for all those marketing folks that are so concerned with internal campaigns, how about creating a nice custom report and automating the delivery or, better yet, use the Custom Report Sharing feature to share this report with others. People will love this because you can change the wording so it does not say Site Search it says Internal Campaigns Report.</p>
<p>But wait, there&#8217;s more! What about using a secondary dimension to view the external marketing campaigns (or sources, or mediums) that drive visitor to react to internal campaigns. Perhaps the extrnal creative has some influence over how visitors react to the internal campaign creative. The data isn&#8217;t so hot in the image below, but you get the idea.</p>
<p><img class="aligncenter size-full wp-image-1412" title="Use a secondary dimension to view external campaigns for each internal campaign." src="http://cutroni.com/blog/wp-content/uploads/2010/03/Picture-12.png" alt="" width="602" height="73" /></p>
<p>And finally, the ultimate in analysis, internal campaign attribution. We can use the Search Term Refinement feature if visitors click on multiple internal campaigns. Google Analytics will track all subsequent site searches, but in our case follow up site searches are actually additional internal campaigns that the visitor responded to. Honestly, I have never found any insights from this type of analysis, but you can do it if you want!</p>
<p>Ok, I&#8217;ve officially entered nerdville.</p>
<p>I think you get the idea. By adding all this data you can do many different kinds of segmentation and analysis. More than enough to understand the behavior of your site visitors and how your internal campaigns perform.</p>
<p>Last but not least, I&#8217;ll mention that you can track internal campaigns using events and custom variables. But both of those solutions require coding. And that requires working with IT. Using Site Search, in most cases, will not require any code changes to your site.</p>
<p><a href="http://cutroni.com/blog/2010/03/30/tracking-internal-campaigns-with-google-analytics/">Tracking Internal Campaigns with Google Analytics</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2009/09/08/tracking-ero-result-searches-in-google-analytics/' rel='bookmark' title='Permanent Link: Tracking Zero Result Searches in Google Analytics'>Tracking Zero Result Searches in Google Analytics</a></li>
<li><a href='http://cutroni.com/blog/2006/09/12/measuring-internal-site-search-with-google-analytics/' rel='bookmark' title='Permanent Link: Measuring Internal Site Search with Google Analytics'>Measuring Internal Site Search with Google Analytics</a></li>
<li><a href='http://cutroni.com/blog/2009/03/12/find-out-when-your-campaigns-suck-with-ga-custom-reports/' rel='bookmark' title='Permanent Link: Find Out When Your Campaigns Suck with GA Custom Reports'>Find Out When Your Campaigns Suck with GA Custom Reports</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2010/03/30/tracking-internal-campaigns-with-google-analytics/feed/</wfw:commentRss>
		<slash:comments>64</slash:comments>
		</item>
		<item>
		<title>New Google Analytics Goals</title>
		<link>http://cutroni.com/blog/2009/10/20/new-google-analytics-goals/</link>
		<comments>http://cutroni.com/blog/2009/10/20/new-google-analytics-goals/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 18:47:35 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Tracking]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[v4]]></category>

		<guid isPermaLink="false">http://www.epikone.com/blog/?p=1186</guid>
		<description><![CDATA[We all know that it&#8217;s critical to measure conversions, or goals, for our website. But for a long time Google Analytics limited the number of conversions, and types of conversions, you could track with Google Analytics. All that changes today (October 20, 2009). You can now create up to 20 goals per profile in Google [...]<p><a href="http://cutroni.com/blog/2009/10/20/new-google-analytics-goals/">New Google Analytics Goals</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2007/09/05/time-on-page-goals-in-google-analytics-website-optimizer/' rel='bookmark' title='Permanent Link: Time-On-Page Goals in Google Analytics &amp; Website Optimizer'>Time-On-Page Goals in Google Analytics &amp; Website Optimizer</a></li>
<li><a href='http://cutroni.com/blog/2007/07/07/google-analytics-goals/' rel='bookmark' title='Permanent Link: All About Google Analytics Goals'>All About Google Analytics Goals</a></li>
<li><a href='http://cutroni.com/blog/2006/08/04/getting-more-out-of-google-analytics-goals/' rel='bookmark' title='Permanent Link: Getting More out of Google Analytics Goals'>Getting More out of Google Analytics Goals</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>We all know that it&#8217;s critical to measure conversions, or goals, for our website.  But for a long time Google Analytics limited the number of conversions, and types of conversions, you could track with Google Analytics.  All that changes today (October 20, 2009).</p>
<p>You can now create up to 20 goals per profile in Google Analytics.  I can literally hear the applause at eMetrics :)</p>
<p>In addition to expanding the number of goals Google has expanded the types of goals to include &#8216;threshold&#8217; goals for pageviews per visit and time on site.</p>
<p>I think we all know the importance of tracking goals, so I&#8217;m not going to get too deep into why you should use goals.  If you&#8217;re not using goals you should start NOW!</p>
<p>Let&#8217;s talk about this new feature.</p>
<h2>Goal Sets</h2>
<p>Goals are now organized into four sets.  Each set of goals can contain up to five different goals.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-24.png" alt="Google Analytics Goal Sets" title="Google Analytics Goal Sets" width="549" height="473" class="aligncenter size-full wp-image-1199" /></p>
<p>Sets have been introduced as a way to accommodate all the new data in GA.  In the report tabs, rather than one goal tab there can be up to four goal tabs in a GA reports.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-191.png" alt="New Google Analytics Goal sets in a report" title="New Google Anlytics Goal sets in a report" width="537" height="116" class="aligncenter size-full wp-image-1189" /></p>
<p>When creating a goal you can place it in any set as long as there is room. Once you place a goal in a set it&#8217;s best to NOT MOVE IT.  Google Analytics sees this as a NEW goal and does not move the previously captured conversions to the new goal.</p>
<p>TIP: I like to organize goals by business function i.e. put goals that are related together.  For example, if you&#8217;re a content site, you might create goals for spending a certain amount of time on site (1 minute, 2 minutes, etc.).  I would group these goals in a set all related to time.</p>
<h2>Goal Types</h2>
<p>In the old days a goal was a pageview that represented the completion of some high value process, like a thank you page.  Now goals can be based on actions that have nothing to do with viewing a page.  Conversions can be based on how much time a visitor spends on the site or how many pages the visitor views.</p>
<h3>Time Based Goals</h3>
<p>Time based conversions are triggered after a visitor has spent a certain amount of time on the site.  To configure a time based goal enter the hours, minutes and seconds that a visitor must spend on the site before a conversion is counted.  Once the visitor reaches that amount of time on the site then a conversion is triggered.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-201.png" alt="Creating time based goals in Google Analytics." title="Creating time based goals in Google Analytics." width="441" height="451" class="aligncenter size-full wp-image-1191" /></p>
<p>What&#8217;s interesting here is that you can create a time based goal if a visit does NOT reach a certain amount of time.  If you choose &#8216;Less Than&#8217; Google Analytics will trigger a goal if a visit does NOT reach a certain length.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-212.png" alt="Less Than Goals in Google Analytics" title="Less Than Goals in Google Analytics" width="428" height="87" class="aligncenter size-full wp-image-1192" /></p>
<p>Why on earth would you measure this?  I like to think of &#8216;Less Than&#8217; goals as <strong>&#8216;Failure&#8217; metrics</strong>.  We often define success metrics, like Conversion Rate, but rarely define metrics to measure our failures!</p>
<p>Using failure based metrics really packs a punch when you&#8217;re talking to co workers or clients.  For example, when you configure a failure goal you can easily measure and say, &#8220;Did you know that 97% of our traffic does not spend at least 2 minutes on our site?  We suck!&#8221;</p>
<p><a href="http://www.kaushik.net/avinash/2006/08/excellent-analytics-tip-7-the-adorable-site-abandonment-rate-metric.html">Abandonment rate</a> is another well know failure metrics.</p>
<p><img src="http://www.cutroni.com/blog/wp-content/uploads/2009/03/clock-150x150.jpg" alt="Time on site can be configured as a Goal in GA" title="Time on site can be configured as a Goal in GA" width="150" height="150" class="alignright size-thumbnail wp-image-973" /></p>
<p>Time based goals can also be very useful if you&#8217;re trying to MINIMIZE the amount of time people spend on your site.  For example, if you have a support section on your site you may want to understand what percentage of traffic spends a certain amount of time on your site.  Long term you can try to reduce the number of visits that are too long.</p>
<p>How about setting up a goal set for various time intervals and then try to move visitors from one &#8220;goal&#8221; bucket to the next.  10 minutes, to 7 minutes, to 5 mintues&#8230; You guys are bright, you get the idea :)</p>
<p>Remember, time based goals can be affected by creating <a href="http://www.cutroni.com/blog/2007/03/19/tracking-clicks-with-ga-pt-1-about-urchintracker/">virtual pageviews</a> and <a href="http://www.cutroni.com/blog/2007/10/16/event-tracking-pt-1-overview-data-model/">events</a>.  Both of these activities send data to Google Analytics and can change how visit length is calculated.</p>
<h3>Pageview Based Goals</h3>
<p>Another new goal type is pageviews per visit.  Like time on site goals this this type of conversion is triggered when a visit exceeds a certain number of pages.  I can literally hear all the advertisers clapping out there!</p>
<p>Pageviews goals are set up in the same manner as time based conversions.  Just specify a condition (greater than or less than) and the number of pageviews in a visit.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-221.png" alt="Pageviews per Visit Goals in Google Analytics" title="Pageviews per Visit Goals in Google Analytics" width="418" height="86" class="aligncenter size-full wp-image-1193" /></p>
<p>Like time goals, pageview goals can also be affected by virtual pageviews.  If you&#8217;re creating a lot of data using <code>_trackPageview()</code> you need to understand that this can change your overall goal calculation.</p>
<h3>URL Destination Goals</h3>
<p>The old standby!  &#8216;Traditional&#8217; goals are now called URL Destination Goals.  You can still use a regular expression, head match or exact match to identify a page that represents a goal.  This functionality has not changed (you can learn more about goals <a href="http://www.cutroni.com/blog/2007/07/07/google-analytics-goals/">in this old post</a>.)</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-36.png" alt="URL Destination Goal in Google Analytics" title="URL Destination Goal in Google Analytics" width="427" height="197" class="aligncenter size-full wp-image-1251" /></p>
<p>Now that we have 20 goals we can easily measure all of those micro conversions (RSS subscription, email signup, reaching product page, downloading white paper&#8230; etc, etc, etc).</p>
<p>And yes, you can still use a virtual pageview as a URL Destination goal.</p>
<h2>Funnels</h2>
<p>Google did spend some time tweaking the interface. The old interface always showed 10 steps in the funnel.  Now you can choose the number of fields the funnel form displays.  You&#8217;re still limited to 10 steps in total.  This isn&#8217;t such a big deal.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-37.png" alt="New Funnels interface in Google Analytics" title="New Funnels interface in Google Analytics" width="273" height="129" class="aligncenter size-full wp-image-1252" /></p>
<p>But think about the bigger picture.  Do we really need funnels if we have so many goals?  With 20 goals we can use a goal to represent each stage in a process, rather than a funnel step? So do we still need funnels?</p>
<p>Yes.  Funnels provide a nice visualization of critical processes, so I think they are still relevant.  Plus, you need to configure a funnel if you want to measure Abandonment rate, a very nice failure metric that can make people squirm :)</p>
<h2>Odds and Ends</h2>
<p>A few random thoughts re: new goals:</p>
<p>If you&#8217;ve been creating lots of profiles for goals you may want to consider consolidating all goals to a single profile.  The benefit is you can  have all your conversions in one interface.  No more messing with multiple browser tabs and adjusting the date range.</p>
<p>If you need to control the access to certain goals, you may need to create a profile for certain goals and then give only the people who need access to those goals access to the profile.</p>
<p>A visitor can only convert at each goal once per visit. This is the way it&#8217;s always been.</p>
<p>And finally, creating new goals will not modify your historical data, only future data.  So all those new goals you&#8217;re going to create this week will only track from the day your create them onward.</p>
<p><a href="http://cutroni.com/blog/2009/10/20/new-google-analytics-goals/">New Google Analytics Goals</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2007/09/05/time-on-page-goals-in-google-analytics-website-optimizer/' rel='bookmark' title='Permanent Link: Time-On-Page Goals in Google Analytics &amp; Website Optimizer'>Time-On-Page Goals in Google Analytics &amp; Website Optimizer</a></li>
<li><a href='http://cutroni.com/blog/2007/07/07/google-analytics-goals/' rel='bookmark' title='Permanent Link: All About Google Analytics Goals'>All About Google Analytics Goals</a></li>
<li><a href='http://cutroni.com/blog/2006/08/04/getting-more-out-of-google-analytics-goals/' rel='bookmark' title='Permanent Link: Getting More out of Google Analytics Goals'>Getting More out of Google Analytics Goals</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2009/10/20/new-google-analytics-goals/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>Google Analytics Custom Variables Overview</title>
		<link>http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/</link>
		<comments>http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 18:46:43 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Tracking]]></category>
		<category><![CDATA[custom variables]]></category>
		<category><![CDATA[v4]]></category>

		<guid isPermaLink="false">http://www.epikone.com/blog/?p=1222</guid>
		<description><![CDATA[Today Google releases Custom Variables (cv for short) in Google Analytics. This is an evolution of the custom segmentation feature. This post is meant to give you an overview of the feature. We&#8217;ll discuss how to use it in a later post. Like Custom Segmentation, custom variables are a flexible way to add more information [...]<p><a href="http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/">Google Analytics Custom Variables Overview</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2007/10/16/event-tracking-pt-1-overview-data-model/' rel='bookmark' title='Permanent Link: Event Tracking Pt. 1: Overview &amp; Data Model'>Event Tracking Pt. 1: Overview &amp; Data Model</a></li>
<li><a href='http://cutroni.com/blog/2007/10/16/ga-on-site-search-pt-1-overview-setup/' rel='bookmark' title='Permanent Link: GA On Site Search Pt. 1: Overview &amp; Setup'>GA On Site Search Pt. 1: Overview &amp; Setup</a></li>
<li><a href='http://cutroni.com/blog/2006/11/10/google-analytics-campaign-tracking-pt-0-an-overview/' rel='bookmark' title='Permanent Link: Google Analytics Campaign Tracking Pt. 0: An Overview'>Google Analytics Campaign Tracking Pt. 0: An Overview</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today Google releases Custom Variables (cv for short) in Google Analytics.  This is an evolution of the custom segmentation feature.  This post is meant to give you an overview of the feature.  We&#8217;ll discuss how to use it in a later post.</p>
<p>Like Custom Segmentation, custom variables are a flexible way to add more information to Google Analytics.  The big difference is that you can create LOTS of custom variables.  How many?  In theory you can set an infinite number of custom variables.  But GA has some internal limits that keep you to 50,000.</p>
<p>What can we use custom variables for?  The possibilities are endless:</p>
<ul>
<li>Segmenting members from non-members</li>
<li>Segmenting customers from non-customers</li>
<li>Tracking all the campaigns a visitor sees prior to converting</li>
<li>Content categorization</li>
<li>Segmenting visitors based on landing page</li>
<li>Visitor segmentation based on demographic info</li>
<li>Customer segmentation based on order history</li>
</ul>
<p><img src="http://cutroni.com/blog/wp-content/uploads/christmas_tree.png" alt="Google Analytics Custom Variables are like data decorations!" title="Google Analytics Custom Variables are like data decorations!" width="125" height="169" class="alignright size-full wp-image-1258" /></p>
<p>As my friend Phil likes to say, custom variables are decorations that you hang on your data.  Almost like holiday decorations hanging on a tree!  This is a really good analogy that I&#8217;ll continue in this post.</p>
<p>There are four critical attributes of a custom variable that we must understand in order to use them.</p>
<h2>Name and Value</h2>
<p>The easiest attributes to understand are Name and Value.  The Name of a custom variable is literally the name you give to the variable.  Each variable can have many, many values.   For example, you could define a variable named &#8216;Baseball Team&#8217; and then add the values:</p>
<ul>
<li>Red Sox</li>
<li>Yankees</li>
<li>Phillies</li>
<li>Giants</li>
<li>Angels</li>
</ul>
<p>This is totally different than the old Custom Segmentation feature.  With Custom Segmentation you were limited to one variable (ie one Name) that could contain multiple values.  Now you can create multiple variables each of which can have multiple values.</p>
<p>You can view all of your variable names in the new Custom Variables report.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-331.png" alt="Google Analytics Custom Variables Report" title="Google Analytics Custom Variables Report" width="628" height="217" class="aligncenter size-full wp-image-1224" /></p>
<p><strong>It&#8217;s important to note that the name of a variable, plus the value for a variable must be less than 64 characters</strong>.  Why?  The data is sent to Google via a request for an image file.  The actual length of the request is limited and Google wants to insure that all of the data makes it to the server.</p>
<h2>Scope</h2>
<p><img src="http://www.cutroni.com/blog/wp-content/uploads/2009/10/scope-mouthwash-canada-150x150.jpg" alt="Google Analytics custom variables depends on the scope of the variable." title="Google Analytics custom variables depends on the scope of the variable." border="0px" width="150" height="150" class="alignright size-thumbnail wp-image-1243" /></p>
<p>The real power of custom variables comes with something called the Scope.  Think of scope as the different  &#8216;levels&#8217; of visitor data.  When a visitor visits a website Google Analytics collects data at three levels:</p>
<ul>
<li><strong>Pageview level</strong>: This is data associated with each page viewed during a visits. Page level data can change from one page to the next.</li>
<li><strong>Visit level</strong>: This is data associated with the visitor&#8217;s entire visit.  This data can change from one visit to the next.  But visit level data is applied to every page within a visit.  This data only exists for the CURRENT visits.</li>
<li><strong>Visitor Level</strong>:  This data is applied to the visitor and every visit and every pageview that the visitor generates.  This data persists across all visits that a person creates.  How does it persist?  Via a cookie.</li>
</ul>
<p>This means we can set information, ie custom variables, at the page level, the visit level and the visitor level.  If we think of custom variables as decorations &#8220;hanging&#8221; on our data then we could use the following graphic:</p>
<p><img src="http://www.cutroni.com/blog/wp-content/uploads/2009/10/cv-scope-300x201.jpg" alt="GA Custom Variables &quot;hanging&quot; on your data." title="GA Custom Variables &quot;hanging&quot; on your data." width="300" height="201" class="aligncenter size-medium wp-image-1225" /></p>
<p>So scope is the same as level.  Anyone drooling out there?</p>
<p>The ability to control the scope of a custom variable makes this feature extremely flexible.  For example, if you want to group all of the content on your site you can add a page level custom variable to every page that identifies the groups that a page belongs to.</p>
<p>If you want to segment visitors by their purchase history you can add visitor level custom variable.  The possibilities are truly endless.</p>
<p>Let&#8217;s take a look at some of the reporting so you can get a feel for some of the data.</p>
<p>Here&#8217;s the Custom Variables report.  You&#8217;ll notice it looks a lot like the user defined report.  This report contains all of the variables that you defined.  If you click on a variable you&#8217;ll see all of the VALUES for that variable.</p>
<p>So why has google added a scope if we can&#8217;t see it in the reports?  I&#8217;m just going to let you guys speculate. But it&#8217;s obviously a critical part of CVs and we should see that data.</p>
<h2>Index</h2>
<p>The last attribute that we need to discuss is something called the Index.  To be honest, it&#8217;s really hard to define the index.  Basically the index is a technical attribute that helps GA organize all the custom variables on a page.</p>
<p>It&#8217;s only used during the implementation, so we&#8217;re not going to dig any further in this post.</p>
<p>Speaking of the implementation, you&#8217;ve probably noticed that I haven&#8217;t talked much about the implementation.  To be honest, we&#8217;re still playing with CVs.  Obviously this data comes from JavaScript.  So you have to do some coding to get this data.</p>
<p>But I&#8217;m going to hold off on the implementation talk until later. Implementation involves another concept called the Index which is, to be honest, vague and confusing.</p>
<p><a href="http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/">Google Analytics Custom Variables Overview</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2007/10/16/event-tracking-pt-1-overview-data-model/' rel='bookmark' title='Permanent Link: Event Tracking Pt. 1: Overview &amp; Data Model'>Event Tracking Pt. 1: Overview &amp; Data Model</a></li>
<li><a href='http://cutroni.com/blog/2007/10/16/ga-on-site-search-pt-1-overview-setup/' rel='bookmark' title='Permanent Link: GA On Site Search Pt. 1: Overview &amp; Setup'>GA On Site Search Pt. 1: Overview &amp; Setup</a></li>
<li><a href='http://cutroni.com/blog/2006/11/10/google-analytics-campaign-tracking-pt-0-an-overview/' rel='bookmark' title='Permanent Link: Google Analytics Campaign Tracking Pt. 0: An Overview'>Google Analytics Campaign Tracking Pt. 0: An Overview</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2009/10/20/google-analytics-custom-variables-overview/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Tracking Zero Result Searches in Google Analytics</title>
		<link>http://cutroni.com/blog/2009/09/08/tracking-ero-result-searches-in-google-analytics/</link>
		<comments>http://cutroni.com/blog/2009/09/08/tracking-ero-result-searches-in-google-analytics/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 02:53:57 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tracking]]></category>
		<category><![CDATA[enhancements]]></category>
		<category><![CDATA[site search]]></category>

		<guid isPermaLink="false">http://www.epikone.com/blog/?p=1105</guid>
		<description><![CDATA[I &#60;3 Google Analytics Site Search reports. There&#8217;s amazingly actionable data in those reports. But they&#8217;re missing one vital piece of information: searches that don&#8217;t produce any results. Why is this important? Don&#8217;t you want to know when visitors search and don&#8217;t get any results? Zero result searches can help your identify missing content on [...]<p><a href="http://cutroni.com/blog/2009/09/08/tracking-ero-result-searches-in-google-analytics/">Tracking Zero Result Searches in Google Analytics</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2007/10/16/ga-on-site-search-pt-2-reporting-usage/' rel='bookmark' title='Permanent Link: GA On Site Search Pt. 2: Reporting &amp; Usage'>GA On Site Search Pt. 2: Reporting &amp; Usage</a></li>
<li><a href='http://cutroni.com/blog/2008/01/13/google-analytics-e-commerce-tracking-pt-1-how-it-works/' rel='bookmark' title='Permanent Link: Google Analytics E-Commerce Tracking Pt. 1: How It Works'>Google Analytics E-Commerce Tracking Pt. 1: How It Works</a></li>
<li><a href='http://cutroni.com/blog/2007/10/16/event-tracking-pt-3-reporting-analysis/' rel='bookmark' title='Permanent Link: Event Tracking Pt. 3: Reporting &amp; Analysis'>Event Tracking Pt. 3: Reporting &amp; Analysis</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I &lt;3 Google Analytics Site Search reports.  There&#8217;s amazingly actionable data in those reports.  But they&#8217;re missing one vital piece of information: searches that don&#8217;t produce any results.</p>
<p>Why is this important?  Don&#8217;t you want to know when visitors search and don&#8217;t get any results?  Zero result searches can help your identify missing content on your site or a problem with your site search engine.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/fenway-scoreboard.png" alt="fenway-scoreboard" title="fenway-scoreboard" width="449" height="149" class="aligncenter size-full wp-image-1170" /></p>
<p>Many search solutions will provide this information for you.  For example, I use <a href="http://tr.im/yd7t">Search Meter</a> for WordPress and it shows me which search queries generate zero results.  But I thought it would be interesting to add this data to Google Analytics.  That way all my site search information would be in one place.</p>
<p>Unfortunately there is no easy way to add this data to GA.  You need to do some programming to collect the data.  So this post is really meant for those folks with programming resources AND for those developers that maintain GA plugins.  Like my buddy <a href="http://tr.im/yd7x">Joost</a>, who has a great GA plugin for WordPress.</p>
<p>If you&#8217;re interested in the data and analysis, skip to the bottom of this post.</p>
<h2>Conceptual Overview</h2>
<p>Our goal with this hack is to modify site search data in two ways.  First, we&#8217;re going to put all search queries with zero results in a category.  This will allow us to use the Search Categories report to easily find all the search terms that yielded zero results.</p>
<p>Second, we&#8217;ll modify the actual search terms to indicate that a term yielded zero results.  This will make it easy to scan a list of all the search terms and identify which generated no results.</p>
<p>Before we get into the implementation, a big THANK YOU to Charles Miller, one of the lead consultants here.  He wrote the JavaScript below.  Thanks Charles.</p>
<h2>Step 1: Identify No Result Search</h2>
<p>The first step is to identify a zero results search page.  Most websites have the same search results page regardless of the number of results.  You need to identify some something that differentiates a zero results search page from a non-zero results search page.</p>
<p>This must be done programatically and is the hardest part of the implementation.</p>
<p>For example, a zero results search page on this blog has the text &#8220;No posts found. Try a different search?&#8221;</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-23.png" alt="No Posts Found" title="No Posts Found" width="468" height="143" class="aligncenter size-full wp-image-1110" /></p>
<p>I can create code (or more specifically, Charles can create code) to look for the text &#8220;No posts found. Try a different search?&#8221; If the code finds this text in the page then I can identify that the visitor&#8217;s search yielded zero results and than I can send the data sent to GA.  Here&#8217;s the code that I&#8217;m using on this blog:</p>
<pre>
<code>var content = document.getElementById('content');
if (content.innerHTML.search('No posts found.')) {</code>
</pre>
<p>The code looks for a section of the page called &#8216;content&#8217; and then searches that section for the phrase &#8216;No posts found.&#8217;.  If &#8216;no posts found.&#8217; is found (oh, the irony!) then we will modify the data sent to GA.</p>
<p>Important!  The way you detect a zero result search page may be different.  It&#8217;s VERY difficult to create an example that will work for everyone.  Take this as a conceptual overview.</p>
<h2>Step 2:  Tweak GA Tracking Code</h2>
<p>Once we know what differentiates a zero results search page we can add some code that tweaks the data.  Remember, we want to modify the data in two ways: 1. by placing it in a special search category and 2. by modifying the search term to indicate it did not yield any results.</p>
<p>To create the category all we need to do is add an extra query string parameter to the URL.</p>
<p>To manipulate the search term we need to split apart the page URL and then put it back together with the phrase no-results.</p>
<p>Here&#8217;s the complete code.</p>
<pre>
<code>&lt;script type='text/javascript'&gt;
var pageTracker = _gat._getTracker("UA-XXXXXX-1");
var content = document.getElementById('content');
if (content.innerHTML.search('No posts found.')) {
     // These lines get the search data from the URL and
     //  deconstruct the URL into parts
     var sn = "s";
     var sr = new RegExp(sn+"=[^\&amp;]+"),
      p = document.location.pathname,
      s = document.location.search,
      sm = s.match(sr).toString(),
      srs = sm.split("="),
      // The next line is where we add the category and add
      // the phrase no-results to the search term.
      sre = sm.replace(sr,srs[0]+"=no-results:
 "+srs[1]+"&amp;cat=no-results"),
      sf = s.replace(sr,sre);
      // Send the data to Google as a Pageview
      pageTracker._trackPageview(p+sf);
} else {
      // If this is a regular page on the site, use the standard GA code.
      pageTracker._trackPageview();
}
&lt;/script&gt;</code>
</pre>
<p>The code starts with the section that identifies a zero result search page.</p>
<p>Then we deconstruct the URL to identify the search term.  Finally we add the category named &#8216;no_results&#8217; and the phrase &#8216;no-results&#8217; to the search term.</p>
<p>If the code does NOT find the term &#8216;No posts found.&#8217; then a pageview is created as normal.</p>
<p>That&#8217;s it for the coding part (thank goodness!)</p>
<h2>Step 3:  Configure Site Search Settings</h2>
<p>The last step is to add the new category parameter to the Site Search settings so GA can identify the no-results search category.  This is easy, it&#8217;s in the profile setting section of Google Analytics.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-33.png" alt="How to set a search Category parameter in Google Analytics" title="How to set a search Category parameter in Google Analytics" width="345" height="153" class="aligncenter size-full wp-image-1111" /></p>
<p>I also like to set the &#8216;Strip Query Parameter&#8217; to YES.  This removes the category parameter after site search is done processing and normalizes your pageview data.</p>
<p>That&#8217;s it for the configuration!  We&#8217;re cleared for insight-hunting!</p>
<h2>Analyzing The Data</h2>
<p>When a visitor performs a search that yields zero results the search term will be placed in a category named &#8216;no_results&#8217;.  To find this data navigate to the Content>Site Search>Categories Report:</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/site-search-categories-google-analytics-2.png" alt="site-search-categories-google-analytics-2" title="site-search-categories-google-analytics-2" width="471" height="94" class="aligncenter size-full wp-image-1155" /></p>
<p>Immediately you&#8217;ll be able to see what percentage of your searches yield zero results.  Hopefully it&#8217;s very low!  Want to see if this impacts conversions or revenue?  Click the Goals or Ecommerce tab to check the conversion rate:</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/site-search-categories-google-analytics-4.png" alt="Zero Result Searches Impact on Website Outcomes" title="Zero Result Searches Impact on Website Outcomes" width="516" height="108" class="aligncenter size-full wp-image-1164" /></p>
<p>This is a bad picture, but you get the point.</p>
<p>Next you can click on the no-results line in the data and see exactly which search terms yielded zero results.</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/site-search-category_-google-analytics-1.png" alt="Search terms that had no results in Google Analytics" title="Search terms that had no results in Google Analytics" width="472" height="185" class="aligncenter size-full wp-image-1157" /></p>
<p>This is super-actionable data.  Now you know where you may be missing content or if your site search engine might be broken.  You should be asking yourself, &#8220;Why are there no results for these terms?  Is there missing content or is there a problem with my site search engine?&#8221;</p>
<p>You&#8217;ll also notice that the search terms now have &#8216;no-results&#8217; in them.  This provides a lot of flexibility for view the search data other ways.  Example, let&#8217;s use the Search Terms report:</p>
<p><img src="http://cutroni.com/blog/wp-content/uploads/site-search-terms-google-analytics-2.png" alt="Google Analytics site search queries" title="Google Analytics site search queries" width="581" height="257" class="aligncenter size-full wp-image-1159" /></p>
<p>Here we can see the search terms ranked by searches.  What percent of your top 10, 20 or 50 are no-result searches?  How is that impacting your bottom line?</p>
<p>This is just the start.  You can use other metrics, like %Search Exists to understand if visitors who receive zero results refine their search or exit.</p>
<p>While this is not the easiest thing to configure, I hope you see the value of the data.  More so, I hope that all those folks that maintain plugins add this type of feature to their GA plugins.  Joost, you listening!?</p>
<p><a href="http://cutroni.com/blog/2009/09/08/tracking-ero-result-searches-in-google-analytics/">Tracking Zero Result Searches in Google Analytics</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2007/10/16/ga-on-site-search-pt-2-reporting-usage/' rel='bookmark' title='Permanent Link: GA On Site Search Pt. 2: Reporting &amp; Usage'>GA On Site Search Pt. 2: Reporting &amp; Usage</a></li>
<li><a href='http://cutroni.com/blog/2008/01/13/google-analytics-e-commerce-tracking-pt-1-how-it-works/' rel='bookmark' title='Permanent Link: Google Analytics E-Commerce Tracking Pt. 1: How It Works'>Google Analytics E-Commerce Tracking Pt. 1: How It Works</a></li>
<li><a href='http://cutroni.com/blog/2007/10/16/event-tracking-pt-3-reporting-analysis/' rel='bookmark' title='Permanent Link: Event Tracking Pt. 3: Reporting &amp; Analysis'>Event Tracking Pt. 3: Reporting &amp; Analysis</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2009/09/08/tracking-ero-result-searches-in-google-analytics/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>How Google Analytics Tracks &#8216;Bookmark&#8217; Visits</title>
		<link>http://cutroni.com/blog/2009/05/20/how-google-analytics-tracks-bookmark-visits/</link>
		<comments>http://cutroni.com/blog/2009/05/20/how-google-analytics-tracks-bookmark-visits/#comments</comments>
		<pubDate>Thu, 21 May 2009 01:00:36 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[About Google Analytics]]></category>
		<category><![CDATA[Campaign Tracking]]></category>
		<category><![CDATA[Tracking]]></category>

		<guid isPermaLink="false">http://www.epikone.com/blog/?p=1037</guid>
		<description><![CDATA[I was recently inspired by a Tweet to write about how GA tracks visitors that use a bookmark to access a site. Simply put, Google Analytics will attribute a &#8216;bookmark&#8217; visit to the information in the Google Analytics campaign cookie. Many people believe that GA tracks bookmark visits as (direct) traffic. Google Analytics does not [...]<p><a href="http://cutroni.com/blog/2009/05/20/how-google-analytics-tracks-bookmark-visits/">How Google Analytics Tracks &#8216;Bookmark&#8217; Visits</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2006/06/25/how-google-analytics-tracks-third-party-domains/' rel='bookmark' title='Permanent Link: How Google Analytics Tracks Third-Party Domains'>How Google Analytics Tracks Third-Party Domains</a></li>
<li><a href='http://cutroni.com/blog/2006/11/10/how-does-google-analytics-track-conversion-referals/' rel='bookmark' title='Permanent Link: How Does Google Analytics Track Conversion Referrals?'>How Does Google Analytics Track Conversion Referrals?</a></li>
<li><a href='http://cutroni.com/blog/2007/10/29/integrating-google-analytics-with-a-crm/' rel='bookmark' title='Permanent Link: Integrating Google Analytics With a CRM'>Integrating Google Analytics With a CRM</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I was recently inspired by a Tweet to write about how <a href="http://analytics.google.com">GA</a> tracks visitors that use a bookmark to access a site.</p>
<p>Simply put, Google Analytics will attribute a &#8216;bookmark&#8217; visit to the information in the Google Analytics campaign cookie.</p>
<p>Many people believe that GA tracks bookmark visits as (direct) traffic.  Google Analytics does not track bookmark traffic as (direct) traffic unless (direct) is the value in the cookie.  Whatever is stored in the campaign cookie becomes the source of the &#8216;bookmark&#8217; visit.</p>
<p>The cookie is named <code>__utmz</code>, I&#8217;ve talked about a few times, in my series on <a href="http://www.cutroni.com/blog/2006/11/10/google-analytics-campaign-tracking-pt-1-link-tagging/">Campaign Tracking</a> and my post on <a href="http://www.cutroni.com/blog/2009/03/18/updated-integrating-google-analytics-with-a-crm/">GA &#8211; CRM integration</a>.  __utmz always stores where the visitor came from (organic search, campaign referral, etc.)</p>
<p>How about a quick video to walk through an example and save me some typing.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/XzR2jJc-Rws&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/XzR2jJc-Rws&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><a href="http://cutroni.com/blog/2009/05/20/how-google-analytics-tracks-bookmark-visits/">How Google Analytics Tracks &#8216;Bookmark&#8217; Visits</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2006/06/25/how-google-analytics-tracks-third-party-domains/' rel='bookmark' title='Permanent Link: How Google Analytics Tracks Third-Party Domains'>How Google Analytics Tracks Third-Party Domains</a></li>
<li><a href='http://cutroni.com/blog/2006/11/10/how-does-google-analytics-track-conversion-referals/' rel='bookmark' title='Permanent Link: How Does Google Analytics Track Conversion Referrals?'>How Does Google Analytics Track Conversion Referrals?</a></li>
<li><a href='http://cutroni.com/blog/2007/10/29/integrating-google-analytics-with-a-crm/' rel='bookmark' title='Permanent Link: Integrating Google Analytics With a CRM'>Integrating Google Analytics With a CRM</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2009/05/20/how-google-analytics-tracks-bookmark-visits/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Count Me Out: GA.JS Version</title>
		<link>http://cutroni.com/blog/2009/04/16/count-me-out-gajs-version/</link>
		<comments>http://cutroni.com/blog/2009/04/16/count-me-out-gajs-version/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 19:28:35 +0000</pubDate>
		<dc:creator>Justin Cutroni</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tracking]]></category>
		<category><![CDATA[google-analytics]]></category>

		<guid isPermaLink="false">http://www.epikone.com/blog/?p=503</guid>
		<description><![CDATA[A while back I wrote a post called Count Me Out! that explained how to exclude Google Analytics data based on the custom segment value. My previous post was based on the old, urchin.js tracking code, and a lot of people have been waiting for an update. It&#8217;s taken a while, but here it is. [...]<p><a href="http://cutroni.com/blog/2009/04/16/count-me-out-gajs-version/">Count Me Out: GA.JS Version</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>



Related posts:<ol><li><a href='http://cutroni.com/blog/2006/07/11/count-me-out/' rel='bookmark' title='Permanent Link: Count Me Out!'>Count Me Out!</a></li>
<li><a href='http://cutroni.com/blog/2008/10/22/google-analytics-version-30/' rel='bookmark' title='Permanent Link: Google Analytics Version 3.0'>Google Analytics Version 3.0</a></li>
<li><a href='http://cutroni.com/blog/2007/08/29/segmenting-members-from-non-members/' rel='bookmark' title='Permanent Link: Segmenting Members from Non-Members'>Segmenting Members from Non-Members</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A while back I wrote a post called <a href="http://www.cutroni.com/blog/2006/07/11/count-me-out/">Count Me Out!</a> that explained how to exclude Google Analytics data based on the custom segment value.</p>
<p>My previous post was based on the old, <code>urchin.js</code> tracking code, and a lot of people have been waiting for an update.  It&#8217;s taken a while, but here it is.</p>
<p>I will mention that my favorite way to exclude traffic from Google Analytics is using an IP exclude filter.  An IP based exclude filter is very accurate unless you having a changing IP.  The method below works best if you have a dynamic or changing IP address.</p>
<p><em><strong>Even if you&#8217;re not interested in this post, there is a fun &#8216;group activity&#8217; below. Please try it!</strong><br />
</em></p>
<p>The old version of this <del datetime="2009-04-16T01:23:04+00:00">hack</del> method required you to add a new page to your website.  That page would set the GA custom segment cookie (named <code>__utmv</code>) on your computer.</p>
<p>This technique works fine, but who wants to add a new page to their site?  It can be a pain.</p>
<p>I&#8217;ve simplified this technique by removing that page.  You can enter the JavaScript directly into your browser.</p>
<h2>Step 1: Set Custom Segment Cookie</h2>
<p>Go to the site that you are tracking with Google Analytics and view a page.</p>
<p>Copy the code below and paste it into the location bar of your browser and click &#8216;enter&#8217; on your keyboard.</p>
<p><iframe src="http://sandbox.epikone.us/justin/blog/count-me-out-1-line.txt" width="560" height="50"></iframe></p>
<p>You should see a message that says, &#8220;Custom segment has been set.  Time to create a filter.&#8221;</p>
<p>Here&#8217;s a tip, you can bookmark this JS to make it easy to reset the cookie in the future.  I set the cookie every time I fire up my browser.</p>
<h2>Step 2: Create Exclude Filter</h2>
<p>Next, create an exclude filter in Google Analytics to exclude the user defined segment (i.e. the cookie) you just created:</p>
<p><img src="http://www.cutroni.com/blog/wp-content/uploads/2008/01/20080119-remove-me-filter.png" alt="" title="Filter to exclude user defined cookie." width="463" height="381" class="aligncenter size-full wp-image-461" /></p>
<p>This filter will exclude anyone with a custom segment cookie with a value of &#8216;remove-me&#8217;.</p>
<p>Remember, cookies are specific to a browser and computer. If you use mulitple browsers or multiple computers you need to set the cookie using all the browsers on all the computers you use.</p>
<h2>Having Some Fun With This!</h2>
<p><img src="http://cutroni.com/blog/wp-content/uploads/picture-14.png" alt="" title="The user defined report in Google Analytics." width="186" height="170" class="alignright size-full wp-image-1033" /></p>
<p>You&#8217;ve probbaly figured out that you can set the custom segment cookie on anyone&#8217;s website as long as they&#8217;re using GA.  This means that you can add data to their User Defined report.  Let&#8217;s try this on my site!</p>
<p>Navigate to <a href="http://www.cutroni.com/blog">www.cutroni.com/blog</a> and place the following code in the location bar of your browser after the page has loaded.  Change FOO to whatever you want and press enter on your keyword.  That&#8217;s it.  You&#8217;re now in my data.</p>
<p><iframe src="http://sandbox.epikone.us/justin/blog/count-me-out-prank.txt" width="560" height="50"></iframe></p>
<p>I&#8217;ll post some of the more popular and creative values in <a href="http://www.twitter.com/justincutroni">Twitter</a> and maybe here at a later date.</p>
<p>Please try to keep it clean.  I often review data with my 4 year old son :)</p>
<h2>Thoughts on the Old Method</h2>
<p>The old version of this technique uses a form to set the custom segment cookie which is pretty handy if you have a lot of people in remote locations that need to be excluded from the data.  Just send all your coworkers, contractors, etc. a link to the page and ask them to set the cookie on their computer.  It&#8217;s a little easier than asking them to paste JS into their browser.</p>
<p>If you&#8217;re interested in using this technique here is a new version of the page and the process.</p>
<p><strong>Step 1</strong>: Create a new page on your site using the code below.</p>
<p>** Note ** The information below is in an iFrame.  If you receive this post via email you may not see the contents.</p>
<p><iframe src="http://sandbox.epikone.us/justin/blog/count-me-out.txt" width="560" height="400"></iframe></p>
<p><strong>Step 2:</strong> Go to the new page you just added, fill out the form, and click the &#8216;Create Cookie&#8217; button.  Keep track of the value you enter into the form, you need it for step 3.</p>
<p><strong>Step 3:</strong> Finally, create an exclude filter in Google Analytics to exclude the value that you entered into the form.  Remember, you need to use a regular expression for the filter field.  So if you entered &#8216;remove-me&#8217; in the form, enter &#8216;remove-me&#8217; as the Filter Field.</p>
<p>That&#8217;s it.  Sorry for the lame post, but I&#8217;m trying to update a lot of the old code and posts on the site.</p>
<p><a href="http://cutroni.com/blog/2009/04/16/count-me-out-gajs-version/">Count Me Out: GA.JS Version</a> is a post from: <a href="http://cutroni.com/blog">Analytics Talk by Justin Cutroni</a></p>


<p>Related posts:<ol><li><a href='http://cutroni.com/blog/2006/07/11/count-me-out/' rel='bookmark' title='Permanent Link: Count Me Out!'>Count Me Out!</a></li>
<li><a href='http://cutroni.com/blog/2008/10/22/google-analytics-version-30/' rel='bookmark' title='Permanent Link: Google Analytics Version 3.0'>Google Analytics Version 3.0</a></li>
<li><a href='http://cutroni.com/blog/2007/08/29/segmenting-members-from-non-members/' rel='bookmark' title='Permanent Link: Segmenting Members from Non-Members'>Segmenting Members from Non-Members</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://cutroni.com/blog/2009/04/16/count-me-out-gajs-version/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)

Served from: cutroni.com @ 2012-02-04 00:05:47 -->
