```json
{
    "title": "When the tracking site goes down…",
    "url": "https://performancezen.com/2004/12/17/when-the-tracking-site-goes-down/",
    "datePublished": "2004-12-17",
    "dateModified": "2022-04-18",
    "language": "en-US",
    "description": "So, what is a geek to do when SiteMeter goes down? He writes his own tracking code and embeds it on his blog page! Really simple PHP Code:",
    "author": "spierzchala",
    "publisher": "Performance Zen"
}
```

# When the tracking site goes down…

So, what is a geek to do when SiteMeter goes down? He writes his own tracking code and embeds it on his blog page!

Really simple PHP Code:

```
<?phpinclude([DATABASE CONNECTION INCLUDE]);$logtime = date("YmdHis");$ipquery = sprintf("%u",ip2long($REMOTE_ADDR));if ($REMOTE_ADDR != [EXCLUDE SOME IPS]){        $query2 = "INSERT into logger.blog_log values ($logtime,$ipquery,'$HTTP_USER_AGENT','$HTTP_REFERER')";        mysql_query($query2) or die("Log Insert Failed");        mysql_close($link);}print "<META HTTP-EQUIV=Refresh CONTENT="0; URL=[IMAGE FILE]"/>";?>
```

Then I create a table in my logging database to trap the results. Once I have that, I created an IFRAME call in an MT Typelist and away we go!

There is always a geeky solution to a customer service issue. If this works, I will cancel my SiteMeter subscription.
