<?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>Boris Masis - Personal Homepage &#187; google analytics</title>
	<atom:link href="http://borism.net/category/google-analytics/feed/" rel="self" type="application/rss+xml" />
	<link>http://borism.net</link>
	<description></description>
	<lastBuildDate>Mon, 24 Aug 2009 20:31:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Creating Google Analytics Goals for Off-Site Links</title>
		<link>http://borism.net/2009/03/11/creating-google-analytics-goals-from-off-site-links/</link>
		<comments>http://borism.net/2009/03/11/creating-google-analytics-goals-from-off-site-links/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 15:09:01 +0000</pubDate>
		<dc:creator>boris</dc:creator>
				<category><![CDATA[google analytics]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.borism.net/?p=122</guid>
		<description><![CDATA[Sometimes you might want to setup a Google Analytics Goal that is actually a link to an off-site url. For example, you conversion page might be on a different domain, but you want to be able to track users who click though to it as completing a goal. We recently launched a WordPress MU blog [...]]]></description>
			<content:encoded><![CDATA[<!-- wp-jquery-lightbox, a WordPress plugin by ulfben --> <p>Sometimes you might want to setup a Google Analytics Goal that is actually a link to an off-site url. For example, you conversion page might be on a different domain, but you want to be able to track users who click though to it as completing a goal.</p>
<p>We recently launched a WordPress MU blog network called <a href="http://www.aupairnews.com">Au Pair News</a> and wanted to track when people click on certain off-site links (such as our &#8220;View Available Au Pairs&#8221; page) as having completed a goal. Google Analytics allows you to do this with a 2 step process.</p>
<p><strong>Step 1: Track a Page View For Your Links</strong><br />
Even though your link is off-site you can still track a virtual page view for it by using the pageTracker call. So for example, we might have:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.culturalcare.com/hostfamilies/availableaupairs/&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;pageTracker._trackPageview('/avaaupairs/');&quot;</span>&gt;</span>View Available Au Pairs<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span></pre></div></div>

<p>Google will now track the /avaaupairs/ page in my aupairnews.com analytics account. (<a href="http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&#038;answer=55597">Learn more about trackPageview</a>)</p>
<p><strong>Step 2: Setup your Goal</strong><br />
Now that /avaaupairs/ is showing up as one of the content pages in Analytics, we can create a goal based off it. Because we&#8217;re operating a blog network where the subdomain is different for each user, our goal is setup as a Regular Expression with the goal url /avaaupairs/ (but if you know the full path, you could use an exact match or a head match as well).</p>
]]></content:encoded>
			<wfw:commentRss>http://borism.net/2009/03/11/creating-google-analytics-goals-from-off-site-links/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Insert Arbitrary HTML into Umbraco Pages</title>
		<link>http://borism.net/2009/02/18/insert-arbitrary-html-into-umbraco-pages/</link>
		<comments>http://borism.net/2009/02/18/insert-arbitrary-html-into-umbraco-pages/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 22:00:19 +0000</pubDate>
		<dc:creator>boris</dc:creator>
				<category><![CDATA[ballroom]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[umbraco]]></category>

		<guid isPermaLink="false">http://www.borism.net/?p=100</guid>
		<description><![CDATA[We have the Umbraco CMS (version 3) configured to use TinyMCE for WYSIWYG editing. It works quite well up until we want to insert some HTML content that TinyMCE strips out (like an embedded youtube video, or a screencast) Here&#8217;s how to create a very simple Umbraco macro (using a c# user control) to allow [...]]]></description>
			<content:encoded><![CDATA[<!-- wp-jquery-lightbox, a WordPress plugin by ulfben --> <p>We have the <a href="http://www.umbraco.org">Umbraco CMS</a> (version 3) configured to use TinyMCE for WYSIWYG editing. It works quite well up until we want to insert some HTML content that TinyMCE strips out (like an embedded youtube video, or a screencast)</p>
<p>Here&#8217;s how to create a very simple Umbraco macro (using a c# user control) to allow you to insert arbitrary HTML code that won&#8217;t interfere with TinyMCE:</p>
<p>Create a visual studio solution and create InsertHTML.ascx with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span> <span style="color: #008000;">%</span>@ Control Language<span style="color: #008000;">=</span><span style="color: #666666;">&quot;C#&quot;</span> AutoEventWireup<span style="color: #008000;">=</span><span style="color: #666666;">&quot;true&quot;</span> Codebehind<span style="color: #008000;">=</span><span style="color: #666666;">&quot;InsertHTML.ascx.cs&quot;</span>
    Inherits<span style="color: #008000;">=</span><span style="color: #666666;">&quot;YourNameSpace.InsertHTML&quot;</span> <span style="color: #008000;">%&gt;</span>
<span style="color: #008000;">&lt;</span> <span style="color: #008000;">%=</span>HTMLCode<span style="color: #008000;">%&gt;</span></pre></div></div>

<p>The code-behind InsertHTML.ascx.cs just needs to have:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Collections</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.Security</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.UI</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.UI.WebControls</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.UI.WebControls.WebParts</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Web.UI.HtmlControls</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF;">namespace</span> YourNameSpace
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">partial</span> <span style="color: #FF0000;">class</span> InsertHTML <span style="color: #008000;">:</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span></span>.<span style="color: #0000FF;">UserControl</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">private</span> <span style="color: #FF0000;">string</span> __HTMLCode <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> HTMLCode
        <span style="color: #000000;">&#123;</span>
            get
            <span style="color: #000000;">&#123;</span>
                <span style="color: #0600FF;">return</span> __HTMLCode<span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
            set
            <span style="color: #000000;">&#123;</span>
                __HTMLCode <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Build your DLL, drop it into the umbraco bin folder, and put the .ascx file in the \usercontrols\ directory. You&#8217;re almost done. Go to Developer -> Macros and create a new macro called &#8220;Insert HTML.&#8221; Point it to the user control on the server and be sure to check &#8220;use in editor.&#8221; Lastly, on the &#8220;Parameters&#8221; tab add a textMultiLine parameter and call it HTMLCode.</p>
<p>You should now see the &#8220;Insert HTML&#8221; macro as one of the options when you click the macro button in the TinyMCE editor. And we&#8217;re done.</p>
<p>Here&#8217;s a solution file extracted from my project:<br />
<a href='http://www.borism.net/wordpress/wp-content/uploads/2009/02/inserthtml.zip'>Download Solution</a></p>
]]></content:encoded>
			<wfw:commentRss>http://borism.net/2009/02/18/insert-arbitrary-html-into-umbraco-pages/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Integrating Google Analytics and Wufoo</title>
		<link>http://borism.net/2008/12/24/integrating-google-analytics-and-wufoo/</link>
		<comments>http://borism.net/2008/12/24/integrating-google-analytics-and-wufoo/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 21:54:43 +0000</pubDate>
		<dc:creator>boris</dc:creator>
				<category><![CDATA[google analytics]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[wufoo]]></category>

		<guid isPermaLink="false">http://www.borism.net/?p=55</guid>
		<description><![CDATA[It&#8217;s fairly simple to integrate Google Analytics so that your campaign variables get saved behind the scenes when someone submits your wufoo form. The code is based on the original post at analytics talk, with some small modifications for wufoo. All we need to do is include a small javascript file that will parse our [...]]]></description>
			<content:encoded><![CDATA[<!-- wp-jquery-lightbox, a WordPress plugin by ulfben --> <p>It&#8217;s fairly simple to integrate Google Analytics so that <a href="http://www.google.com/support/analytics/bin/answer.py?hl=en&#038;answer=55579">your campaign variables</a> get saved behind the scenes when someone submits your <a href="http://www.wufoo.com">wufoo</a> form.</p>
<p>The code is based on the <a href="http://www.epikone.com/blog/2007/10/29/integrating-google-analytics-with-a-crm/">original post at analytics talk</a>, with some small modifications for wufoo.</p>
<p>All we need to do is include a small javascript file that will parse our google analytics cookie and pass it to wufoo using <a href="http://wufoo.com/docs/url-modifications/">url modification</a>.</p>
<p>Here&#8217;s a 4 minute screencast of what we&#8217;ll be achieving:</p>
<p><a href="http://www.screencast.com/t/n8TaJYbK"><img src="http://www.borism.net/wordpress/wp-content/uploads/2009/01/screen.jpg" alt="" title="screencast" class="alignnone" /></a></p>
<p>Note that the code relies on the old version of the google analytics code (urchin.js <strong>update:</strong> you can find <a href="http://www.epikone.com/blog/2009/03/18/updated-integrating-google-analytics-with-a-crm/">updated javascript for the new version of the tracking code</a> at Analytics Talk, however I have not yet integrated it with wufoo) and I&#8217;m using jquery for $(document).ready functionality, but you could use your library of choice if you don&#8217;t use jQuery.</p>
<p>The complete javascript is</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">//</span>
    <span style="color: #006600; font-style: italic;">// Get the __utmz cookie value. This is the cookies that</span>
    <span style="color: #006600; font-style: italic;">// stores all campaign information.</span>
    <span style="color: #006600; font-style: italic;">//</span>
    <span style="color: #003366; font-weight: bold;">var</span> z <span style="color: #339933;">=</span> _uGC<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">cookie</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'__utmz='</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">';'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #006600; font-style: italic;">//</span>
    <span style="color: #006600; font-style: italic;">// The cookie has a number of name-value pairs.</span>
    <span style="color: #006600; font-style: italic;">// Each identifies an aspect of the campaign.</span>
    <span style="color: #006600; font-style: italic;">//</span>
    <span style="color: #006600; font-style: italic;">// utmcsr  = campaign source</span>
    <span style="color: #006600; font-style: italic;">// utmcmd  = campaign medium</span>
    <span style="color: #006600; font-style: italic;">// utmctr  = campaign term (keyword)</span>
    <span style="color: #006600; font-style: italic;">// utmcct  = campaign content (used for A/B testing)</span>
    <span style="color: #006600; font-style: italic;">// utmccn  = campaign name</span>
    <span style="color: #006600; font-style: italic;">// utmgclid = unique identifier used when AdWords auto tagging is enabled</span>
    <span style="color: #006600; font-style: italic;">//</span>
    <span style="color: #006600; font-style: italic;">// This is very basic code. It separates the campaign-tracking cookie</span>
    <span style="color: #006600; font-style: italic;">// and populates a variable with each piece of campaign info.</span>
    <span style="color: #006600; font-style: italic;">//</span>
    <span style="color: #003366; font-weight: bold;">var</span> source  <span style="color: #339933;">=</span> _uGC<span style="color: #009900;">&#40;</span>z<span style="color: #339933;">,</span> <span style="color: #3366CC;">'utmcsr='</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> medium  <span style="color: #339933;">=</span> _uGC<span style="color: #009900;">&#40;</span>z<span style="color: #339933;">,</span> <span style="color: #3366CC;">'utmcmd='</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> term    <span style="color: #339933;">=</span> _uGC<span style="color: #009900;">&#40;</span>z<span style="color: #339933;">,</span> <span style="color: #3366CC;">'utmctr='</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> content <span style="color: #339933;">=</span> _uGC<span style="color: #009900;">&#40;</span>z<span style="color: #339933;">,</span> <span style="color: #3366CC;">'utmcct='</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> campaign <span style="color: #339933;">=</span> _uGC<span style="color: #009900;">&#40;</span>z<span style="color: #339933;">,</span> <span style="color: #3366CC;">'utmccn='</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> gclid   <span style="color: #339933;">=</span> _uGC<span style="color: #009900;">&#40;</span>z<span style="color: #339933;">,</span> <span style="color: #3366CC;">'utmgclid='</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'|'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #006600; font-style: italic;">//</span>
    <span style="color: #006600; font-style: italic;">// The gclid is ONLY present when auto tagging has been enabled.</span>
    <span style="color: #006600; font-style: italic;">// All other variables, except the term variable, will be '(not set)'.</span>
    <span style="color: #006600; font-style: italic;">// Because the gclid is only present for Google AdWords we can</span>
    <span style="color: #006600; font-style: italic;">// populate some other variables that would normally</span>
    <span style="color: #006600; font-style: italic;">// be left blank.</span>
    <span style="color: #006600; font-style: italic;">//</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>gclid <span style="color: #339933;">!=</span><span style="color: #3366CC;">&quot;-&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          source <span style="color: #339933;">=</span> <span style="color: #3366CC;">'google'</span><span style="color: #339933;">;</span>
          medium <span style="color: #339933;">=</span> <span style="color: #3366CC;">'cpc'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #006600; font-style: italic;">// Data from the custom segmentation cookie can also be passed</span>
    <span style="color: #006600; font-style: italic;">// back to wufoo via url modification</span>
    <span style="color: #003366; font-weight: bold;">var</span> csegment <span style="color: #339933;">=</span> _uGC<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">cookie</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'__utmv='</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">';'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>csegment <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'-'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #003366; font-weight: bold;">var</span> csegmentex <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/[1-9]*?\.(.*)/</span><span style="color: #339933;">;</span>
          csegment    <span style="color: #339933;">=</span> csegment.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span>csegmentex<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
          csegment    <span style="color: #339933;">=</span> csegment<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
          csegment <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #006600; font-style: italic;">//modify the wufoo iframe location to pass the analytics values</span>
    frames<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'https://youraccount.wufoo.com/embed/123/def/field30='</span> <span style="color: #339933;">+</span> source <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;field36='</span> <span style="color: #339933;">+</span> medium <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;field35='</span> <span style="color: #339933;">+</span> term <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;field34='</span> <span style="color: #339933;">+</span> content <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;field33='</span> <span style="color: #339933;">+</span> campaign <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;field32='</span> <span style="color: #339933;">+</span> gclid<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://borism.net/2008/12/24/integrating-google-analytics-and-wufoo/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>
