<?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>DansNetwork.com &#187; greasemonkey</title>
	<atom:link href="http://dansnetwork.com/tag/greasemonkey/feed/" rel="self" type="application/rss+xml" />
	<link>http://dansnetwork.com</link>
	<description>Web Design, Javascript, CSS, and More...</description>
	<lastBuildDate>Wed, 19 May 2010 20:02:07 +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>Google Analytics Date Range &#8211; Analytics Today</title>
		<link>http://dansnetwork.com/2008/01/09/google-analytics-date-range-analytics-today/</link>
		<comments>http://dansnetwork.com/2008/01/09/google-analytics-date-range-analytics-today/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 02:11:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[javascript]]></category>
		<guid isPermaLink="false">http://blog.dansnetwork.com/2008/01/09/google-analytics-date-range-analytics-today/</guid>
		<description><![CDATA[Google Analytic&#8217;s default date range is one month. As of this writing, there isn&#8217;t a way to change it. When tracking the visitors of multiple websites, it is often nice to be able to see the activity of the current day. In order to change the date range, you have to use the Flash based [...]]]></description>
			<content:encoded><![CDATA[<p>Google Analytic&#8217;s default date range is one month. As of this writing, there isn&#8217;t a way to change it. When tracking the visitors of multiple websites, it is often nice to be able to see the activity of the current day. In order to change the date range, you have to use the Flash based calendar on the right hand side of the page. The calendar sends a request back to Google servers to fetch the information for the date range that you chose. Although nice to use, it can be time consuming and tedious.</p>
<blockquote><p><img src="http://blog.dansnetwork.com/images/ganalytics.jpg" alt="Analytics Calendar" border="0" /></p></blockquote>
<p>The other way to request a date range is to pass a date parameter in the URL:</p>
<p><span style="color: #808080">Example:<br />
<em>https: //google.com&#8230;.dashboard?&#8230;</em><strong>&amp;pdr=20080109-20080109</strong></span></p>
<p><span style="color: #808080"><em>parameter</em>: <strong>pdr</strong></span></p>
<p><span style="color: #808080"><em>value</em>: <strong>20080109-20080109</strong> (YearMonthDay-YearMonthDay)</span></p>
<p><a href="http://www.google.com/url?sa=t&amp;ct=res&amp;cd=1&amp;url=https%3A%2F%2Faddons.mozilla.org%2Fen-US%2Ffirefox%2Faddon%2F748&amp;ei=J3CFR8jaEqjkigHx8YX5BA&amp;usg=AFQjCNGwTfL-iNiyO_EdM51X1x7LgP1rEg&amp;sig2=xN0k47R7np-n69HRoJGWFQ" title="Greasemonkey Add-on" target="_blank">Greasemonkey</a> is a Firefox Add-on that allows customized JavaScript to be added to any web page that you visit.</p>
<p>I&#8217;ve written a user script called Analytics Today that sets your Analytics date range to the current day instead of the previous month. You can still obviously change the range just as you do now. Please feel free to try it out. I&#8217;ve included it, along with source code, below!</p>
<p>-</p>
<blockquote><p><strong>Download it here -&gt;  <a href="http://blog.dansnetwork.com/images/analyticstoday.user.js" title="Analytics Today" target="_blank">AnalyticsToday.user.js </a> &#8211; v0.1.3 (10-21-08)</strong></p></blockquote>
<p>-</p>
<p><strong>Source Code:</strong></p>
<pre class="brush: jscript;">// ==UserScript==
// @name          Analytics Today - v0.1.3
// @namespace     blog.dansnetwork.com
// @description   Sets Google Analytic's default date range to today.
// @include       https://www.google.com/analytics/reporting*
// @exclude
// ==/UserScript==
var url = window.location.href;
var urlParam = &quot;&amp;pdr=&quot;;
var today = new Date();
var day = today.getDate().toString();
var month = (today.getMonth() + 1).toString();
var year = today.getFullYear().toString();
var todaysRange;
if(day &lt; 10)
day = '0' + day;
if(month &lt; 10)
month = '0' + month;
var todaysRange = year + month + day + '-' + year + month + day;
if(url.indexOf(urlParam) &lt; 0)
window.location.href += '&amp;pdr=' + todaysRange;</pre>
]]></content:encoded>
			<wfw:commentRss>http://dansnetwork.com/2008/01/09/google-analytics-date-range-analytics-today/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
