<?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"
	>
<channel>
	<title>Comments on: Automatically Show All Profiles in GA</title>
	<atom:link href="http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/</link>
	<description>LunaMetric's blog on conversion rate and web analytics</description>
	<pubDate>Wed, 19 Nov 2008 22:31:37 +0000</pubDate>
	<generator>http://wordpress.org/</generator>
		<item>
		<title>By: Erik Vold</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-2672</link>
		<dc:creator>Erik Vold</dc:creator>
		<pubDate>Thu, 16 Oct 2008 20:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-2672</guid>
		<description>Hey, I love the user script!

I’m making a firefox extension to compile a bunch of GA user scripts together and was wondering if I could get permission from you to add this script to the extension?

Let me know,
Thanks,
Erik Vold</description>
		<content:encoded><![CDATA[<p>Hey, I love the user script!</p>
<p>I’m making a firefox extension to compile a bunch of GA user scripts together and was wondering if I could get permission from you to add this script to the extension?</p>
<p>Let me know,<br />
Thanks,<br />
Erik Vold</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lozbo</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-2009</link>
		<dc:creator>Lozbo</dc:creator>
		<pubDate>Thu, 07 Aug 2008 16:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-2009</guid>
		<description>Great! I felt just the same about that! It's annoying to be clicking on "show 100" every time you log in. Very useful, thanks and congrats!</description>
		<content:encoded><![CDATA[<p>Great! I felt just the same about that! It&#8217;s annoying to be clicking on &#8220;show 100&#8243; every time you log in. Very useful, thanks and congrats!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1901</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 29 Jul 2008 17:55:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1901</guid>
		<description>Yes, I've somewhat neglected this script.

Originally the script was just 3 lines:

if (!window.location.href.match(/ns=/))
{
  if (!window.location.href.match(/\?/)) {window.location.href = window.location.href + '?ns=100';}
  else {window.location.href = window.location.href + '&#38;ns=100';}
}

The current code with the loop was added after Andre (see comments) pointed out that my version would redirect even if the account had 10 or fewer profiles.

Grabbing the form by name and going from there is certainly more elegant.  You might be interested also in checking out Jeremy's approach -- he incorporated the idea into GA report enhancer (see comments).

When I get some time I'll plan to revise the script with your improvement.

Thanks for the feedback.</description>
		<content:encoded><![CDATA[<p>Yes, I&#8217;ve somewhat neglected this script.</p>
<p>Originally the script was just 3 lines:</p>
<p>if (!window.location.href.match(/ns=/))<br />
{<br />
  if (!window.location.href.match(/\?/)) {window.location.href = window.location.href + &#8216;?ns=100&#8242;;}<br />
  else {window.location.href = window.location.href + &#8216;&amp;ns=100&#8242;;}<br />
}</p>
<p>The current code with the loop was added after Andre (see comments) pointed out that my version would redirect even if the account had 10 or fewer profiles.</p>
<p>Grabbing the form by name and going from there is certainly more elegant.  You might be interested also in checking out Jeremy&#8217;s approach &#8212; he incorporated the idea into GA report enhancer (see comments).</p>
<p>When I get some time I&#8217;ll plan to revise the script with your improvement.</p>
<p>Thanks for the feedback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Vold</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1889</link>
		<dc:creator>Erik Vold</dc:creator>
		<pubDate>Mon, 28 Jul 2008 20:21:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1889</guid>
		<description>Code Speed Suggestion:

To check if the current setting is 'show 10 rows', currently you are looping through every link on the page until you find the next link. Instead I'm going to suggest this:

var tempIndex = 0;

// find the form named 'length'
for(var i = tempIndex; i &#60; document.forms.length; i++){
    if( document.forms[ i ].name == "length" ){
        tempIndex = i;
        
        break;
    }
}

// grab the form
var tempForm = document.forms[ tempIndex ];

// grab the form's one and only select box.
var tempSelect = tempForm.getElementsByTagName('select')[0];

if( tempSelect.options[ tempSelect.selectedIndex ].value == "10" ){
  // do url change here.
}

What do you think?

Erik.</description>
		<content:encoded><![CDATA[<p>Code Speed Suggestion:</p>
<p>To check if the current setting is &#8217;show 10 rows&#8217;, currently you are looping through every link on the page until you find the next link. Instead I&#8217;m going to suggest this:</p>
<p>var tempIndex = 0;</p>
<p>// find the form named &#8216;length&#8217;<br />
for(var i = tempIndex; i &lt; document.forms.length; i++){<br />
    if( document.forms[ i ].name == &#8220;length&#8221; ){<br />
        tempIndex = i;</p>
<p>        break;<br />
    }<br />
}</p>
<p>// grab the form<br />
var tempForm = document.forms[ tempIndex ];</p>
<p>// grab the form&#8217;s one and only select box.<br />
var tempSelect = tempForm.getElementsByTagName(&#8217;select&#8217;)[0];</p>
<p>if( tempSelect.options[ tempSelect.selectedIndex ].value == &#8220;10&#8243; ){<br />
  // do url change here.<br />
}</p>
<p>What do you think?</p>
<p>Erik.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1543</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 27 Jun 2008 15:00:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1543</guid>
		<description>Thanks André,

I'll try to get those changes in today.  I think you've now done more work on this script than I have.

I'll also mention that Jeremy at ROI Revolution has incorporated this idea into his GA Report Enhancer greasemonkey script. Anyone who is interested can take a look at what he's doing at

http://www.roirevolution.com/blog/2008/06/google_analytics_report_enhancer.html</description>
		<content:encoded><![CDATA[<p>Thanks André,</p>
<p>I&#8217;ll try to get those changes in today.  I think you&#8217;ve now done more work on this script than I have.</p>
<p>I&#8217;ll also mention that Jeremy at ROI Revolution has incorporated this idea into his GA Report Enhancer greasemonkey script. Anyone who is interested can take a look at what he&#8217;s doing at</p>
<p><a href="http://www.roirevolution.com/blog/2008/06/google_analytics_report_enhancer.html" rel="nofollow">http://www.roirevolution.com/blog/2008/06/google_analytics_report_enhancer.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: André Scholten</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1541</link>
		<dc:creator>André Scholten</dc:creator>
		<pubDate>Fri, 27 Jun 2008 13:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1541</guid>
		<description>Hi John, I got some other improvements:

1. When I click "edit" next to a specific filter I go to the edit page. The script automatically redirects me to the ns=100 version, but that isn't necessary. I changed the seconde if statement to this:

if (foundNext = 1 &#38;&#38; !window.location.href.match(/ns=/) &#38;&#38; !window.location.href.match(/rid=/))

2. Because of the reload function in the script the back button functionality gets broken, you have to click it twice if you want to navigate back. You can fix this by replacing the location.href function with location.replace. The last one replaces the url and removes the old one from the browsers history. So if you click on the back button you will navigate the right way:

if (!window.location.href.match(/\?/)) {window.location.replace(window.location.href + '?ns=100') ;}
else {window.location.replace(window.location.href + '&#38;ns=100');}

HTH</description>
		<content:encoded><![CDATA[<p>Hi John, I got some other improvements:</p>
<p>1. When I click &#8220;edit&#8221; next to a specific filter I go to the edit page. The script automatically redirects me to the ns=100 version, but that isn&#8217;t necessary. I changed the seconde if statement to this:</p>
<p>if (foundNext = 1 &amp;&amp; !window.location.href.match(/ns=/) &amp;&amp; !window.location.href.match(/rid=/))</p>
<p>2. Because of the reload function in the script the back button functionality gets broken, you have to click it twice if you want to navigate back. You can fix this by replacing the location.href function with location.replace. The last one replaces the url and removes the old one from the browsers history. So if you click on the back button you will navigate the right way:</p>
<p>if (!window.location.href.match(/\?/)) {window.location.replace(window.location.href + &#8216;?ns=100&#8242;) ;}<br />
else {window.location.replace(window.location.href + &#8216;&amp;ns=100&#8242;);}</p>
<p>HTH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1519</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 19 Jun 2008 14:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1519</guid>
		<description>oops.  thanks.</description>
		<content:encoded><![CDATA[<p>oops.  thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: André Scholten</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1518</link>
		<dc:creator>André Scholten</dc:creator>
		<pubDate>Thu, 19 Jun 2008 14:06:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1518</guid>
		<description>Hi John,

Nice addition, now it's complete. 

Ps. You need to change this line:

if (foundNext = 1 &#38;&#38; !window.location.href.match(/ns=/))

to:

if (foundNext == 1 &#38;&#38; !window.location.href.match(/ns=/))</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>Nice addition, now it&#8217;s complete. </p>
<p>Ps. You need to change this line:</p>
<p>if (foundNext = 1 &amp;&amp; !window.location.href.match(/ns=/))</p>
<p>to:</p>
<p>if (foundNext == 1 &amp;&amp; !window.location.href.match(/ns=/))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1517</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 19 Jun 2008 13:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1517</guid>
		<description>Andre,

I modified your code slightly, and I plan to update the hosted script.  Here's what I have:

atags = document.getElementsByTagName("a");
var foundNext = 0;
for (var i = 0; i &#60; atags.length; i++)
{
  if (atags[i].href.match(/sn=11/)){ foundNext = 1; break;}
}

if (foundNext = 1 &#38;&#38; !window.location.href.match(/ns=/))
{
if (!window.location.href.match(/\?/)) {window.location.href = window.location.href + '?ns=100';}
else {window.location.href = window.location.href + '&#38;ns=100';}
}</description>
		<content:encoded><![CDATA[<p>Andre,</p>
<p>I modified your code slightly, and I plan to update the hosted script.  Here&#8217;s what I have:</p>
<p>atags = document.getElementsByTagName(&#8221;a&#8221;);<br />
var foundNext = 0;<br />
for (var i = 0; i &lt; atags.length; i++)<br />
{<br />
  if (atags[i].href.match(/sn=11/)){ foundNext = 1; break;}<br />
}</p>
<p>if (foundNext = 1 &amp;&amp; !window.location.href.match(/ns=/))<br />
{<br />
if (!window.location.href.match(/\?/)) {window.location.href = window.location.href + &#8216;?ns=100&#8242;;}<br />
else {window.location.href = window.location.href + &#8216;&amp;ns=100&#8242;;}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1516</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 19 Jun 2008 12:32:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.lunametrics.com/blog/2008/06/12/automatically-show-all-profiles-in-ga/#comment-1516</guid>
		<description>Thanks Andre.

I appreciate you taking the time. I'm going to update my script and try it out now.</description>
		<content:encoded><![CDATA[<p>Thanks Andre.</p>
<p>I appreciate you taking the time. I&#8217;m going to update my script and try it out now.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
