Created
July 31, 2010 01:55
-
-
Save twerth/501646 to your computer and use it in GitHub Desktop.
Monitor GA events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Monitors your workstation's network, then reports anytime a GA event is tracked | |
# on any web page | |
# You must install ngrep to use. On OSX: sudo port install ngrep | |
# Change 'en0' to the device you want to to monitor ('en0' is the first ethernet card). | |
# Use 'ifconfig' to see what devices you have | |
sudo echo 'Monitoring GA events' | |
echo | |
echo '---------------------' | |
echo 'category*action*label' | |
echo '---------------------' | |
sudo ngrep -W byline -qld en0 'utmt=event' | grep 'utmt=event' --line-buffered | awk -F"[\(\)]" '{print $2}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment