<?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>We Love... &#187; flash analytics</title>
	<atom:link href="http://www.welove72.com/blog/tag/flash-analytics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.welove72.com/blog</link>
	<description>this is the lighter side of we love... opinions, news, fun stuff, our friends and partners. enjoy, comment and spread the love...</description>
	<lastBuildDate>Wed, 01 Feb 2012 11:13:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Track flash events in google analytics</title>
		<link>http://www.welove72.com/blog/2009/07/track-flash-events-in-google-analytics/</link>
		<comments>http://www.welove72.com/blog/2009/07/track-flash-events-in-google-analytics/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 22:59:53 +0000</pubDate>
		<dc:creator>villaaston</dc:creator>
				<category><![CDATA[We Love... Technology]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[flash analytics]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://www.welove72.com/blog/?p=1245</guid>
		<description><![CDATA[This relatively easy method is especially useful as it does not require your file to be included in a HTML page, as many other techniques do. Download the AnalyticsLibrary component here: http://code.google.com/p/gaforflash/downloads/list and follow the instructions in the readme.txt file to install the Flash component. Create a new flash file called Tracker.fla and an actioscript&#160;<a href="http://www.welove72.com/blog/2009/07/track-flash-events-in-google-analytics/">Read more</a>]]></description>
			<content:encoded><![CDATA[<p>This relatively easy method is especially useful as it does not require your file to be included in a HTML page, as many other techniques do.</p>
<p>Download the AnalyticsLibrary component here: <a href="http://code.google.com/p/gaforflash/downloads/lis" target="_blank">http://code.google.com/p/gaforflash/downloads/list</a> and follow the instructions in the readme.txt file to install the Flash component.</p>
<p>Create a new flash file called Tracker.fla and an actioscript file called Tracker.as. When installed correctly you can drag the  AnalyticsLibrary component from the components panel into your fla&#8217;s library. Add the following code to your Analytics.as file.</p>
<pre>package {

Â Â Â  import com.google.analytics.AnalyticsTracker;
Â Â Â  import com.google.analytics.GATracker;
Â Â Â  import flash.display.MovieClip;

Â Â Â  public class Tracker extends MovieClip {

Â Â Â  Â Â Â  private var tracker:AnalyticsTracker;

Â Â Â  Â Â Â  public function Tracker():void
Â Â Â  Â Â Â  {
Â Â Â  Â Â Â  Â Â Â  tracker = new GATracker( this, "UA-111-222", "AS3", true );
Â Â Â  Â Â Â  Â Â Â  tracker.trackPageview("/initial-load");
Â Â Â  Â Â Â  }
Â Â Â  }
}</pre>
<p>First import the two analytics libraries we will be using, AnalyticsTracker and GATracker. Then we create a new instance of the AnalyticsTracker, which needs four paramaters:</p>
<ul>
<li>The current display object (â€œthisâ€)</li>
<li>Your analytics account ID (â€œUA-111-222â€)</li>
<li>The tracking mode, either Bridge or AS3.</li>
<li>The debug mode. This defines whether helpful messages will be displayed for errors. You should set this to true when testing and false when your application is live.</li>
</ul>
<p>Finally, the trackPageview method creates a new page view on your google analytics account. This method can of course be placed inside a button click method or similar. To test, enter Tracker as the document class on Tracker.fla and press Ctrl+Enter to test the movie. See the results below:</p>
<p><a href="http://www.welove72.com/blog/wp-content/uploads/2009/07/results.jpg"><img class="aligncenter size-full wp-image-1246" src="http://www.welove72.com/blog/wp-content/uploads/2009/07/results.jpg" alt="" width="491" height="101" /></a></p>
<p>If anyone needs it I can also upload the source!</p>
<p>Happy tracking</p>
<p><strong>This tip and others from We Love are in the latest issue of <a href="http://www.webdesignermag.co.uk/" target="_blank">Web Designer Magazine</a> in the article &#8220;55 Pro Flash Tips&#8221;! Look out for Gavin Clark.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.welove72.com/blog/2009/07/track-flash-events-in-google-analytics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

