Don’t track traffic in Google Analytics from your computer
I recently built a new website that wasn’t getting much traffic which I was using analytics to track the traffic for. I found that while testing the site I was skewing the data which I had not accounted for initially, so I couldn’t tell who was visiting the site at first. Well I did some digging and found that I could set up a filter to not track certain IP addresses. I didn’t think this was a good idea since I knew that verizon’s DSL IPs were pretty dynamic and will switch about once a month or so. With some more research I found that I could set a cookie with a specific value and set a filter up in Google Analytics so that if the browser had the specific cookie it wouldn’t track it. Here are the stops to set this up:
1) First create a page called no_track.html or something memorable with the following code. Make sure to change the (“UA-XXXXXX-X”) bit to your Analytics account number for your domain.
<html>
<head>
</head>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write("</script><script src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'>< /script>" );
</script>
<script type="text/javascript">
var pageTracker = <em>gat.</em>getTracker("UA-XXXXXX-X");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<body onLoad="javascript: pageTracker._setVar('no_track');">
<p> Welcome, your computer will not be tracked on this site as a cookie has been
set to exclude it.</p>
</body>
</html>
---------------------------------------------------------------
2) Create an Exclude filter to remove data from visitors with this cookie. Follow these instructions http://www.google.com/support/googleanalytics/bin/answer.py?answer=55494
to create a filter with the following settings:
Filter Type: Custom filter > Exclude
Filter Field: User Defined
Filter Pattern: no_track
Case Sensitive: No
3) In order to set the cookie, visit your newly created page from all computers that you would like to exclude from your reports. Please note that if you clear your cookies on your browser that you will have to visit this page again to re-set the cookie.
Free 10 Week Online AJAX Course
A free 10-week “AJAX Programming” online course is about to start from August 4th, 2006. This course is for anyone who wants to learn AJAX for the first time or increase their knowledge on AJAX. In this 10-week course, students learn basic concept of AJAX as well as how to use various AJAX frameworks and toolkits….
YShout Enabled
I have recently discovered a neat PHP and AJAX powered, Web 2.0 standards compliant, Non-Intrusive shoutbox called YShout. It’s open source and anyone can download and install in onto their PHP supported webserver. Since the Yshout is AJAX powered you do not have to refresh the page, it’s dynamic! I just need to figure out how to format in to be in my sidebar. Anyway feel free to check it out on my site HERE.
I have changed the ability to see the persons IP address in the chat so that a person can not spoof another persons nickname. I also changed the log file extension to .html rather than .txt so that you can view the file correctly in a web browser. Here is a copy of my modified YShout: Modified YShout
To install all you have to do is install the yshout folder onto your webserver and it’s ready to go. Just point your browser to the folder and there you have it!
Pulse-width Modulation on the PIC 16F877A
Ok, so if you made it past the title, you’re doin’ good. The 16F877A is a microcontroller made by microchip, and I just happen to be using it at work.
Pulse-width modulation is a way of controlling the brightness of an LED, not through resistance, but rather through its duration of being lit. For instance, an LED at half brightness would be on for exactly 1/2 of the time. Basically, it would switch back and forth between on and off at an even pace.
Last night, I had to find a way to control the brightness of a strand of LEDs based only on a 0-7 value off of an analog potentiometer. By design, the maximum brightness for the LEDs will be 1/8 of their maximum ability. This was to reduce heat and fire hazard.
With PWM, since the LED’s on-time is inversely preportional to its off-time, the calculation was rather simple. At the maximum setting (7), the LEDs are on 1/8th of the time. So I made the total duty cycle 56 clock cycles. I then assigned ON_TIME = Knob_Setting and OFF_TIME = 56 – Knob_Setting. This created a whole duty cycle where the LED was on and off evenly with the knob setting.
Encryption Software
I have been using ccrypt for my encryption needs for quite a while now. I have mainly used it on my desktop but recently I wanted to install it on my lappy. The README that comes with the package can walk you through the steps pretty well but I did have to do some investigating to get it installed. After unpacking the latest version of ccrypt for OS X open terminal and type “echo $PATH” to determine where OS X will be looking for executables. This is my output on 10.4 “/bin:/sbin:/usr/bin:/usr/sbin” . I then copied the ccrypt executable to /usr/bin and while in that directory made a couple of symlinks by typing these three separate commands
sudo ln -s ccrypt ccencrypt
sudo ln -s ccrypt ccdecrypt
sudo ln -s ccrypt ccat
I then wanted to install my man page for ccrypt. You can find your man page path by typing “manpath“. This is my output: “/usr/share/man:/usr/local/share/man:/usr/X11R6/man”
I then copied “ccrypt.1” to “/usr/share/man/man1” so that now when I type “man ccrypt” in terminal it will output the man page. Now you are ready to encrypt some files!! Make sure you remember your encryption key because there is no way to recover a encrypted file with out the encryption key. This is why you encrypted them in the first place.







