Helpful git-svn cheatsheet
April 28th, 2011
In my previous post A successful git-svn workflow, I wrote about starting out with git-svn. This post is a followup with notes on more advanced topics.
Can you setup Google Analytics to work on your localhost? Yes!
I searched for the answer to this question and found many responses, several of them said it’s not possible. The solution wasn’t easy to find and I tried several things before finally getting it to work, so I thought I would post what I did to get it to work on my localhost.
First, you’ll need to to create a Google Analytics account (http://www.google.com/analytics/); and for that, you’ll need a gmail account. When you create a new Analytics account, the first thing you’ll need to supply is a url for your website. Google Analytics won’t let you put in the url for your localhost (e.g.: http://localhost:8080), you have to enter a url that Google Analytics will allow (i.e.: it must include a ”.”). I used http://localhost.local (a suggestion I found on a forum somewhere).
Continue through the Google Analytics setup screens (the rest are self explanatory). Once you get to the last page of the setup screens, you’ll see some javascript that was generated for you to paste into your site. Before copying the code, select the “Multiple top-level domains” radio button (there are a couple additional lines of code in this version of the javascript). This is the javascript you’ll want to paste into the
or your page.Here’s what the code looks like…
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxxx-x']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', 'true']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
(Note: The UA id is unique for each Analytics account. Replace the ‘UA-xxxxxxxx-x’ value with the unique UA id that is generated by Goole Analytics for your site.)
After adding this code to your page, view the source of the page and verify the javascript is there. Then be patient, it can take up to 24 hours for Google to detect your code. (It took about 20 minutes for mine)
Once Google finds your code, the icon on your Google Analytics Overview screen will change from a yellow warning icon to a green checkmark.
After you get the green checkbox, Google Analytics will start capturing your data. I’ve noticed there is a 5-10 minute delay from the time I click through the screens on my site, to the time I see the data in the Google Analytics reports.
One other thing to note, the date range on the Google Analytics dashboard and reports defaults to end on yesterday’s date. Make sure to modify the date range to include today’s date to see your most recent activity.
In my previous post A successful git-svn workflow, I wrote about starting out with git-svn. This post is a followup with notes on more advanced topics.
Using Firebug to tweak layouts is incredibly easy. With Firebug Lite, that functionality is available in just about every web browser.
This article is to cover the process of setting up a virtual machine in such a way that you can remote administer it and connect to it like any server on your network. This example will be running and OS X host with a Ubuntu Server 10.10 guest.
Insert bio here