<?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>Juozas devBlog &#187; Google</title>
	<atom:link href="http://dev.juokaz.com/category/google/feed" rel="self" type="application/rss+xml" />
	<link>http://dev.juokaz.com</link>
	<description>Random ideas, scripts and facts</description>
	<lastBuildDate>Mon, 22 Mar 2010 10:48:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>E-commerce sales tracking with Google Analytics</title>
		<link>http://dev.juokaz.com/google/e-commerce-sales-tracking-with-google-analytics</link>
		<comments>http://dev.juokaz.com/google/e-commerce-sales-tracking-with-google-analytics#comments</comments>
		<pubDate>Wed, 25 Feb 2009 14:56:10 +0000</pubDate>
		<dc:creator>Juozas</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[e-shop]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[orders]]></category>
		<category><![CDATA[profit]]></category>
		<category><![CDATA[sales]]></category>
		<category><![CDATA[shop]]></category>
		<category><![CDATA[tracker]]></category>

		<guid isPermaLink="false">http://dev.juokaz.com/?p=267</guid>
		<description><![CDATA[Google Analytics is default choice for visitors tracking, but it can be also used for sales statistics. I have been working with e-commerce projects for a while, and have implemented very powerful back-end statistics tools, but I always try to search for easier to use (and functional enough) tools. Today I&#8217;m going to talk about [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.google.com/analytics">Google Analytics</a> is default choice for visitors tracking, but it can be also used for sales statistics. I have been working with e-commerce projects for a while, and have implemented very powerful back-end statistics tools, but I always try to search for easier to use (and functional enough) tools. Today I&#8217;m going to talk about E-commerce functionality in Google Analytics &#8211; free and easy to use online tool.</p>
<p><img class="size-full wp-image-277" style="float: right;" title="E-commerce" src="http://dev.juokaz.com/wp-content/uploads/2009/02/ecommerce-overview-google-analytics_1235571575598.png" alt="E-commerce" width="284" height="248" />E-commerce tracker works like normal Google analytics code, it&#8217;s simply part of it. Your job is to decide when to supply Google with transaction information, but I see only one logical time &#8211; right after confirmed payment.</p>
<p>To track your transactions you <strong>need</strong> to have &#8220;Success page&#8221;, a page, where users will be redirected after successful payment. If you don&#8217;t have such, you probably won&#8217;t be able to track transactions &#8211; it&#8217;s possible to submit transactions in other pages, but only submitting them in success page would give correct results (further details below). If you have tried Goals in analytics, you know what I&#8217;m talking about.</p>
<p>In your success page you need to slightly modify current Analytics tracker code. Google has very good API documentation available at <a href="http://code.google.com/apis">code.google.com/apis</a>, and all required information for transactions tracking is <a href="http://code.google.com/apis/analytics/docs/gaJSApiEcommerce.html">here</a> (yes, only 3 functions). Sample transaction code is this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">var</span> gaJsHost <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;https:&quot;</span> <span style="color: #339933;">==</span> document.<span style="color: #660066;">location</span>.<span style="color: #660066;">protocol</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> 
<span style="color: #3366CC;">&quot;https://ssl.&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://www.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>unescape<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;%3Cscript src='&quot;</span> <span style="color: #339933;">+</span> gaJsHost <span style="color: #339933;">+</span> 
<span style="color: #3366CC;">&quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
  <span style="color: #003366; font-weight: bold;">var</span> pageTracker <span style="color: #339933;">=</span> _gat._getTracker<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;UA-ANALYTICS-ID&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  pageTracker._trackPageview<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Track pageview</span>
&nbsp;
  pageTracker._addTrans<span style="color: #009900;">&#40;</span>
    <span style="color: #3366CC;">&quot;1234&quot;</span><span style="color: #339933;">,</span>                    <span style="color: #006600; font-style: italic;">// Order ID</span>
    <span style="color: #3366CC;">&quot;Mountain View&quot;</span><span style="color: #339933;">,</span>           <span style="color: #006600; font-style: italic;">// Store name</span>
    <span style="color: #3366CC;">&quot;11.99&quot;</span><span style="color: #339933;">,</span>                   <span style="color: #006600; font-style: italic;">// Total</span>
    <span style="color: #3366CC;">&quot;1.29&quot;</span><span style="color: #339933;">,</span>                    <span style="color: #006600; font-style: italic;">// Tax</span>
    <span style="color: #3366CC;">&quot;5&quot;</span><span style="color: #339933;">,</span>                       <span style="color: #006600; font-style: italic;">// Shipping</span>
    <span style="color: #3366CC;">&quot;San Jose&quot;</span><span style="color: #339933;">,</span>                <span style="color: #006600; font-style: italic;">// City</span>
    <span style="color: #3366CC;">&quot;California&quot;</span><span style="color: #339933;">,</span>              <span style="color: #006600; font-style: italic;">// State</span>
    <span style="color: #3366CC;">&quot;USA&quot;</span>                      <span style="color: #006600; font-style: italic;">// Country</span>
  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  pageTracker._addItem<span style="color: #009900;">&#40;</span>
    <span style="color: #3366CC;">&quot;1234&quot;</span><span style="color: #339933;">,</span>                    <span style="color: #006600; font-style: italic;">// Order ID</span>
    <span style="color: #3366CC;">&quot;DD44&quot;</span><span style="color: #339933;">,</span>                    <span style="color: #006600; font-style: italic;">// Product code</span>
    <span style="color: #3366CC;">&quot;T-Shirt&quot;</span><span style="color: #339933;">,</span>                 <span style="color: #006600; font-style: italic;">// Product Name </span>
    <span style="color: #3366CC;">&quot;Green Medium&quot;</span><span style="color: #339933;">,</span>            <span style="color: #006600; font-style: italic;">// Category</span>
    <span style="color: #3366CC;">&quot;11.99&quot;</span><span style="color: #339933;">,</span>                   <span style="color: #006600; font-style: italic;">// Price</span>
    <span style="color: #3366CC;">&quot;1&quot;</span>                        <span style="color: #006600; font-style: italic;">// Quantity</span>
  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  pageTracker._addItem<span style="color: #009900;">&#40;</span>..<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #006600; font-style: italic;">// Another Item</span>
&nbsp;
  pageTracker._trackTrans<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   <span style="color: #006600; font-style: italic;">// Track transaction</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>What you do, is tell Google unique order ID, prices, shipping location and items information. All these parameters will later be used to analyse your sales and give information about popular products, customers habits, etc. Basically, Google analytics is easy way to merge your traffic and sales statistics.</p>
<p>E-commerce tracking has problems too. Most problems arise from success page requirement. For example, in PayPal customer can choose not to go back to shop. PayPal will send payment notification, but because user doesn&#8217;t visit your website, you&#8217;ve <em>lost</em> one transaction. It&#8217;s possible to supply transaction information as soon as user visits website again, but statistics won&#8217;t be accurate &#8211; user will probably come again from different source, different keywords, or even different month.</p>
<p>However, I recommend trying Google E-commerce tracking for all shops, especially small ones, because they probably don&#8217;t have good inside statistics. Statistics in back-end are always much more accurate and informative, but they require much more time and are really harder to implement than adding 20 lines of code. I&#8217;d vote for good back-end statistics and Google analytics for visitors vs. buyers analysis.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.juokaz.com/google/e-commerce-sales-tracking-with-google-analytics/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>„Canonical tags“ to help with duplicated content?</title>
		<link>http://dev.juokaz.com/google/canonical-tags-to-help-with-duplicated-content</link>
		<comments>http://dev.juokaz.com/google/canonical-tags-to-help-with-duplicated-content#comments</comments>
		<pubDate>Fri, 13 Feb 2009 00:06:22 +0000</pubDate>
		<dc:creator>Juozas</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[duplicated content]]></category>
		<category><![CDATA[head]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://dev.juokaz.com/?p=122</guid>
		<description><![CDATA[As searchengineland.com reports, today Google, Microsoft and Yahoo agreed on new meta tag &#8211; canonical tag.
Canonical tag is the easiest way so far to remove duplicated content which is not duplicated at all. For example, image that I have a page accessible through „http://dev.juokaz.com/page/hello.php&#8221; URL. All links below will point to same page and, if [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://searchengineland.com/canonical-tag-16537">searchengineland.com reports</a>, today Google, Microsoft and Yahoo agreed on new meta tag &#8211; <strong>canonical tag</strong>.</p>
<p>Canonical tag is the easiest way so far to remove duplicated content which is not duplicated at all. For example, image that I have a page accessible through „http://dev.juokaz.com/page/hello.php&#8221; URL. All links below will point to same page and, if they are found by Google, will be indexed in search engine:</p>
<ol>
<li> http://dev.juokaz.com/page/hello.php<em>?SID=hd9328h3298f32h9832hf329 </em></li>
<li> http://dev.juokaz.com/page/hello.php?<em>utm_medium=main&amp;utm_source=banner&amp;utm_compaign=digg </em></li>
<li> http://dev.juokaz.com/page/hello.php?<em>debug=1 </em></li>
<li>etc.</li>
</ol>
<p>As you can image, this is not good, because different links + same content = duplicated content. There are solutions to avoid it, but they require creating rules for ULRs, trying to clean-up them and them redirecting to correct ones. Today canonical tag was introduced, which allows to remove this problem very simply. All you need to do, is to add this this link to your HTML&#8217;s &lt;head&gt; node:</p>
<p>&lt;link rel=&#8221;<strong>canonical</strong>&#8221; href=&#8221;http://dev.juokaz.com/page/hello.php&#8221; /&gt;</p>
<p>That&#8217;s it! Search engines reads this information and knows, that correct version is in specified URL. All other URLs (if their page have this tag) will not be indexed or appear in search results. Even page rank will be automatically assigned to correct link. Very clever and user-friendly solution.</p>
<p>It&#8217;s still a fresh technology, so there are no real-life examples of canonical tags results, but I expect that this will work just fine and duplicated content problem will be a little bit easier to avoid. Good work Google (and others)!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.juokaz.com/google/canonical-tags-to-help-with-duplicated-content/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
