<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for MJDIGITAL :: Mark Jackson | Digital Consultant</title>
	<atom:link href="http://www.mjdigital.co.uk/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mjdigital.co.uk/blog</link>
	<description>Online Marketing, SEO, Search engine optimisation, optimization, Web Development, digital strategy, digital strategist, online marketing consultant</description>
	<lastBuildDate>Sat, 04 Sep 2010 00:08:48 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Search and Replace text in whole MySQL database by Nikko</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-183</link>
		<dc:creator>Nikko</dc:creator>
		<pubDate>Sat, 04 Sep 2010 00:08:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-183</guid>
		<description>Awesome! Just what I needed</description>
		<content:encoded><![CDATA[<p>Awesome! Just what I needed</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Track XML or server-side files using Google Analytics by mj7</title>
		<link>http://www.mjdigital.co.uk/blog/track-xml-or-server-side-files-using-google-analytics/comment-page-1/#comment-182</link>
		<dc:creator>mj7</dc:creator>
		<pubDate>Thu, 02 Sep 2010 13:37:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=240#comment-182</guid>
		<description>Yes you can do this quite easily if you are using Apache and have mod_rewrite enabled - just add the following to your .htaccess file:&lt;br&gt;&lt;br&gt;# INTERCEPT PDF FILE&lt;br&gt;RewriteCond %{HTTP_HOST} ^.*$ 				# For all hosts&lt;br&gt;RewriteRule ^homesteaders-rulebook.pdf$ track-hs-rules.php [L]		# Replace file silently&lt;br&gt;&lt;br&gt;You can expand on this and use mod_rewrite to send all requests for any PDF (or other files) to your tracking script and then track multiple downloads with one script. This is slightly more in depth but if you think it would be of value then I could post a new article with full details of how to do this (I use this facility myself to track downloads from my blog - it also tracks clicks on my mini URLs).&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>Yes you can do this quite easily if you are using Apache and have mod_rewrite enabled &#8211; just add the following to your .htaccess file:</p>
<p># INTERCEPT PDF FILE<br />RewriteCond %{HTTP_HOST} ^.*$ 				# For all hosts<br />RewriteRule ^homesteaders-rulebook.pdf$ track-hs-rules.php [L]		# Replace file silently</p>
<p>You can expand on this and use mod_rewrite to send all requests for any PDF (or other files) to your tracking script and then track multiple downloads with one script. This is slightly more in depth but if you think it would be of value then I could post a new article with full details of how to do this (I use this facility myself to track downloads from my blog &#8211; it also tracks clicks on my mini URLs).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Track XML or server-side files using Google Analytics by Michael Mindes</title>
		<link>http://www.mjdigital.co.uk/blog/track-xml-or-server-side-files-using-google-analytics/comment-page-1/#comment-181</link>
		<dc:creator>Michael Mindes</dc:creator>
		<pubDate>Thu, 02 Sep 2010 10:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=240#comment-181</guid>
		<description>Awesome!  That worked, thanks.  One last question is there a way to have the URL in the browser displayed as the original link rather than the php script.&lt;br&gt;&lt;br&gt;For example, right now I 301 redirect &lt;a href=&quot;http://tastyminstrelgames.com/rules/homesteaders-rulebook.pdf&quot; rel=&quot;nofollow&quot;&gt;http://tastyminstrelgames.com/rules/homesteaders-rulebook.pdf&lt;/a&gt; to track-hs-rules.php.&lt;br&gt;&lt;br&gt;So the url shows up as &lt;a href=&quot;http://tastyminstrelgames.com/rules/track-hs-rules.php&quot; rel=&quot;nofollow&quot;&gt;http://tastyminstrelgames.com/rules/track-hs-rules.php&lt;/a&gt; (which of course I do not want people actually linking to)</description>
		<content:encoded><![CDATA[<p>Awesome!  That worked, thanks.  One last question is there a way to have the URL in the browser displayed as the original link rather than the php script.</p>
<p>For example, right now I 301 redirect <a href="http://tastyminstrelgames.com/rules/homesteaders-rulebook.pdf" rel="nofollow">http://tastyminstrelgames.com/rules/homesteaders-rulebook.pdf</a> to track-hs-rules.php.</p>
<p>So the url shows up as <a href="http://tastyminstrelgames.com/rules/track-hs-rules.php" rel="nofollow">http://tastyminstrelgames.com/rules/track-hs-rules.php</a> (which of course I do not want people actually linking to)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Track XML or server-side files using Google Analytics by mj7</title>
		<link>http://www.mjdigital.co.uk/blog/track-xml-or-server-side-files-using-google-analytics/comment-page-1/#comment-180</link>
		<dc:creator>mj7</dc:creator>
		<pubDate>Wed, 01 Sep 2010 13:52:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=240#comment-180</guid>
		<description>Michael - sorry to take so long in replying, I&#039;ve just got back from holiday. The problem is that you are trying to output a PDF as XML. The code will track any file but in the last three lines where you output the file to the browser you need to tweak a little - the first line of these last three tells the browser what type file to expect - in this case text/xml (an XML file) and then the second line gets the contents of the file, the third dumps it out to the browser.&lt;br&gt;&lt;br&gt;If you want to track a PDF you need to change the header content type to match - try changing the last three lines to the following:&lt;br&gt;&lt;br&gt;header(&#039;Content-Type: application/pdf;&#039;); // set the document content type to PDF&lt;br&gt;$pdf = @file_get_contents(&#039;homesteaders-rules.pdf&#039;); // get the actual file to output&lt;br&gt;echo $pdf; // output the data&lt;br&gt;&lt;br&gt;Let me know if that helps.&lt;br&gt;&lt;br&gt;MJ</description>
		<content:encoded><![CDATA[<p>Michael &#8211; sorry to take so long in replying, I&#39;ve just got back from holiday. The problem is that you are trying to output a PDF as XML. The code will track any file but in the last three lines where you output the file to the browser you need to tweak a little &#8211; the first line of these last three tells the browser what type file to expect &#8211; in this case text/xml (an XML file) and then the second line gets the contents of the file, the third dumps it out to the browser.</p>
<p>If you want to track a PDF you need to change the header content type to match &#8211; try changing the last three lines to the following:</p>
<p>header(&#39;Content-Type: application/pdf;&#39;); // set the document content type to PDF<br />$pdf = @file_get_contents(&#39;homesteaders-rules.pdf&#39;); // get the actual file to output<br />echo $pdf; // output the data</p>
<p>Let me know if that helps.</p>
<p>MJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Track XML or server-side files using Google Analytics by Michael Mindes</title>
		<link>http://www.mjdigital.co.uk/blog/track-xml-or-server-side-files-using-google-analytics/comment-page-1/#comment-178</link>
		<dc:creator>Michael Mindes</dc:creator>
		<pubDate>Thu, 26 Aug 2010 02:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=240#comment-178</guid>
		<description>The code I am using...  I don&#039;t know what is the problem&lt;br&gt;&lt;br&gt;&lt;?php&lt;br&gt;&lt;br&gt;$ga_uid=&#039;UA-1152824-2&#039;; // Enter your unique GA Urchin ID (utmac)&lt;br&gt;$ga_domain=&#039;www.tastyminstrelgames.com&#039;; // Enter your domain name/host name (utmhn)&lt;br&gt;$ga_randNum=rand(1000000000,9999999999);// Creates a random request number (utmn)&lt;br&gt;$ga_cookie=rand(10000000,99999999);// Creates a random cookie number (cookie)&lt;br&gt;$ga_rand=rand(1000000000,2147483647); // Creates a random number below 2147483647 (random)&lt;br&gt;$ga_today=time(); // Current Timestamp&lt;br&gt;$ga_referrer=$_SERVER[&#039;HTTP_REFERER&#039;]; // Referrer url&lt;br&gt;	 &lt;br&gt;$ga_userVar=&#039;&#039;; // Enter any variable data you want to pass to GA or leave blank&lt;br&gt;$ga_hitPage=&#039;/rules/homesteaders-rules.pdf&#039;; // Enter the page address you want to track&lt;br&gt;	 &lt;br&gt;$gaURL=&#039;http://www.google-analytics.com/__utm.gif?utmwv=1&amp;utmn=&#039;.$ga_randNum.&#039;&amp;utmsr=-&amp;utmsc=-&amp;utmul=-&amp;utmje=0&amp;utmfl=-&amp;utmdt=-&amp;utmhn=&#039;.$ga_domain.&#039;&amp;utmr=&#039;.$ga_referrer.&#039;&amp;utmp=&#039;.$ga_hitPage.&#039;&amp;utmac=&#039;.$ga_uid.&#039;&amp;utmcc=__utma%3D&#039;.$ga_cookie.&#039;.&#039;.$ga_rand.&#039;.&#039;.$ga_today.&#039;.&#039;.$ga_today.&#039;.&#039;.$ga_today.&#039;.2%3B%2B__utmb%3D&#039;.$ga_cookie.&#039;%3B%2B__utmc%3D&#039;.$ga_cookie.&#039;%3B%2B__utmz%3D&#039;.$ga_cookie.&#039;.&#039;.$ga_today.&#039;.2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D&#039;.$ga_cookie.&#039;.&#039;.$ga_userVar.&#039;%3B&#039;;&lt;br&gt;	 &lt;br&gt;$handle = @fopen($gaURL, &quot;r&quot;); // open the xml file&lt;br&gt;$fget = @fgets($handle); // get the XML data&lt;br&gt;@fclose($handle); // close the xml file&lt;br&gt;	 &lt;br&gt;header(&#039;Content-Type: text/xml;&#039;); // set the document content type for the output&lt;br&gt;$xml = @file_get_contents(&#039;homesteaders-rules.pdf&#039;); // get the actual file to output&lt;br&gt;echo $xml; // output the data&lt;br&gt;&lt;br&gt;?&gt;</description>
		<content:encoded><![CDATA[<p>The code I am using&#8230;  I don&#39;t know what is the problem</p>
<p>&lt;?php</p>
<p>$ga_uid=&#39;UA-1152824-2&#39;; // Enter your unique GA Urchin ID (utmac)<br />$ga_domain=&#39;www.tastyminstrelgames.com&#39;; // Enter your domain name/host name (utmhn)<br />$ga_randNum=rand(1000000000,9999999999);// Creates a random request number (utmn)<br />$ga_cookie=rand(10000000,99999999);// Creates a random cookie number (cookie)<br />$ga_rand=rand(1000000000,2147483647); // Creates a random number below 2147483647 (random)<br />$ga_today=time(); // Current Timestamp<br />$ga_referrer=$_SERVER[&#39;HTTP_REFERER&#39;]; // Referrer url</p>
<p>$ga_userVar=&#39;&#39;; // Enter any variable data you want to pass to GA or leave blank<br />$ga_hitPage=&#39;/rules/homesteaders-rules.pdf&#39;; // Enter the page address you want to track</p>
<p>$gaURL=&#39;http://www.google-analytics.com/__utm.gif?utmwv=1&#038;utmn=&#39;.$ga_randNum.&#39;&#038;utmsr=-&#038;utmsc=-&#038;utmul=-&#038;utmje=0&#038;utmfl=-&#038;utmdt=-&#038;utmhn=&#39;.$ga_domain.&#39;&#038;utmr=&#39;.$ga_referrer.&#39;&#038;utmp=&#39;.$ga_hitPage.&#39;&#038;utmac=&#39;.$ga_uid.&#39;&#038;utmcc=__utma%3D&#39;.$ga_cookie.&#39;.&#39;.$ga_rand.&#39;.&#39;.$ga_today.&#39;.&#39;.$ga_today.&#39;.&#39;.$ga_today.&#39;.2%3B%2B__utmb%3D&#39;.$ga_cookie.&#39;%3B%2B__utmc%3D&#39;.$ga_cookie.&#39;%3B%2B__utmz%3D&#39;.$ga_cookie.&#39;.&#39;.$ga_today.&#39;.2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D&#39;.$ga_cookie.&#39;.&#39;.$ga_userVar.&#39;%3B&#39;;</p>
<p>$handle = @fopen($gaURL, &#8220;r&#8221;); // open the xml file<br />$fget = @fgets($handle); // get the XML data<br />@fclose($handle); // close the xml file</p>
<p>header(&#39;Content-Type: text/xml;&#39;); // set the document content type for the output<br />$xml = @file_get_contents(&#39;homesteaders-rules.pdf&#39;); // get the actual file to output<br />echo $xml; // output the data</p>
<p>?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Track XML or server-side files using Google Analytics by Michael Mindes</title>
		<link>http://www.mjdigital.co.uk/blog/track-xml-or-server-side-files-using-google-analytics/comment-page-1/#comment-179</link>
		<dc:creator>Michael Mindes</dc:creator>
		<pubDate>Thu, 26 Aug 2010 02:29:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=240#comment-179</guid>
		<description>I am getting an XML parse error:&lt;br&gt;&lt;br&gt;XML Parsing Error: not well-formed&lt;br&gt;Location: &lt;a href=&quot;http://tastyminstrelgames.com/rules/track-hs-rules.php&quot; rel=&quot;nofollow&quot;&gt;http://tastyminstrelgames.com/rules/track-hs-ru...&lt;/a&gt;&lt;br&gt;Line Number 1, Column 9:&lt;br&gt;%PDF-1.3&lt;br&gt;--------^&lt;br&gt;&lt;br&gt;I have no clue what this means  :(  I followed the direction exactly.</description>
		<content:encoded><![CDATA[<p>I am getting an XML parse error:</p>
<p>XML Parsing Error: not well-formed<br />Location: <a href="http://tastyminstrelgames.com/rules/track-hs-rules.php" rel="nofollow"></a><a href="http://tastyminstrelgames.com/rules/track-hs-ru.." rel="nofollow">http://tastyminstrelgames.com/rules/track-hs-ru..</a>.<br />Line Number 1, Column 9:<br />%PDF-1.3<br />&#8212;&#8212;&#8211;^</p>
<p>I have no clue what this means  <img src='http://www.mjdigital.co.uk/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   I followed the direction exactly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Track XML or server-side files using Google Analytics by Czar</title>
		<link>http://www.mjdigital.co.uk/blog/track-xml-or-server-side-files-using-google-analytics/comment-page-1/#comment-177</link>
		<dc:creator>Czar</dc:creator>
		<pubDate>Fri, 20 Aug 2010 02:25:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=240#comment-177</guid>
		<description>Would be great to get that class... I already had a look at the mobile pages... not wuite what I need. I need serverside sending of GA events.</description>
		<content:encoded><![CDATA[<p>Would be great to get that class&#8230; I already had a look at the mobile pages&#8230; not wuite what I need. I need serverside sending of GA events.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Track XML or server-side files using Google Analytics by mj7</title>
		<link>http://www.mjdigital.co.uk/blog/track-xml-or-server-side-files-using-google-analytics/comment-page-1/#comment-176</link>
		<dc:creator>mj7</dc:creator>
		<pubDate>Fri, 20 Aug 2010 01:44:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=240#comment-176</guid>
		<description>Hey thanks for your comments. I must admit that I started working on this only really to track a few odds and sods and have not taken it to the level I think you are after. I would suggest it you really want to do a lot of tracking with GA and not use JS or do it all server-side you may be better off looking at the mobile tracking capabilities as this gives you much more scope and is also documented by Google - you can read up on it here: &lt;a href=&quot;http://code.google.com/mobile/analytics/docs/&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/mobile/analytics/docs/&lt;/a&gt; &lt;br&gt;&lt;br&gt;If you really get stuck just shout as I have been meaning to develop a PHP class which allows quick and easy server-side tracking with GA (including events, custom variables and AdWords/Campaign tracking) - I&#039;ll have to add it to my to do list.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;MJ</description>
		<content:encoded><![CDATA[<p>Hey thanks for your comments. I must admit that I started working on this only really to track a few odds and sods and have not taken it to the level I think you are after. I would suggest it you really want to do a lot of tracking with GA and not use JS or do it all server-side you may be better off looking at the mobile tracking capabilities as this gives you much more scope and is also documented by Google &#8211; you can read up on it here: <a href="http://code.google.com/mobile/analytics/docs/" rel="nofollow">http://code.google.com/mobile/analytics/docs/</a> </p>
<p>If you really get stuck just shout as I have been meaning to develop a PHP class which allows quick and easy server-side tracking with GA (including events, custom variables and AdWords/Campaign tracking) &#8211; I&#39;ll have to add it to my to do list.</p>
<p>Thanks</p>
<p>MJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Track XML or server-side files using Google Analytics by Czar</title>
		<link>http://www.mjdigital.co.uk/blog/track-xml-or-server-side-files-using-google-analytics/comment-page-1/#comment-175</link>
		<dc:creator>Czar</dc:creator>
		<pubDate>Thu, 19 Aug 2010 15:39:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=240#comment-175</guid>
		<description>I like your idea and came across that concept on several pages. But there are a few things in my mind where maybe you have an answer or know from your experienc with the result in GA:&lt;br&gt;&lt;br&gt;1. When using random numbers for 3 of the provided vars, will Google count the request as NEW users? Shouldn&#039;t the cookie be used to identify the user somehow?&lt;br&gt;2. I guess the requesting IP and hence country will alsways be my server. Can you at least use filters to &quot;mark&quot; anonimze those requests? Result would be some &quot;unknown&quot; source in the reports.&lt;br&gt;3. Can or maybe have you already modified the script to track events instead of pageviews? I need t track downloads which are provided by a PHP file based on some GET params.&lt;br&gt;4. Can you make the &quot;hitpage&quot; dynamic, so that it really displays the url the file has originally been requested on?&lt;br&gt;&lt;br&gt;Thanks!</description>
		<content:encoded><![CDATA[<p>I like your idea and came across that concept on several pages. But there are a few things in my mind where maybe you have an answer or know from your experienc with the result in GA:</p>
<p>1. When using random numbers for 3 of the provided vars, will Google count the request as NEW users? Shouldn&#39;t the cookie be used to identify the user somehow?<br />2. I guess the requesting IP and hence country will alsways be my server. Can you at least use filters to &#8220;mark&#8221; anonimze those requests? Result would be some &#8220;unknown&#8221; source in the reports.<br />3. Can or maybe have you already modified the script to track events instead of pageviews? I need t track downloads which are provided by a PHP file based on some GET params.<br />4. Can you make the &#8220;hitpage&#8221; dynamic, so that it really displays the url the file has originally been requested on?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and Replace text in whole MySQL database by Devin Walker</title>
		<link>http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/comment-page-1/#comment-174</link>
		<dc:creator>Devin Walker</dc:creator>
		<pubDate>Wed, 11 Aug 2010 23:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mjdigital.co.uk/blog/?p=52#comment-174</guid>
		<description>Nice code, it could be so much more... maybe a WordPress plugin?</description>
		<content:encoded><![CDATA[<p>Nice code, it could be so much more&#8230; maybe a WordPress plugin?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
