I am saving templates as files and now just recently I noticed that when I open a template in my Code Editor via FTP the then open template gets displayed in Google Analytics "Realtime" report, like this:


I find this to be quite confusing and I am wondering why this is happening and if there is anything I can do to prevent this behaviour.

Thanks and Cheers!


Additional Info

Two more things to consider: I am using Config Master and Stash with this particular site. I set the Analytics code like this: $env_global['global:google_analytics'] = 'UA-XXXXXXX-X'; and get it like this {global:google_analytics} in my Stash wrapper template later on.

  • This seems really strange. Is your FTP client's code editor rendering the HTML for some reason? What client are you using? Nov 30 '13 at 2:06
  • I'm using Panic's Coda but rarely use the preview function.
    – Marc
    Nov 30 '13 at 9:55
  • Just exclude your development IP addresses from Google Analytics. You should be doing this anyways, because you don't want your stats to be counted.
    – Michael P
    Dec 2 '13 at 4:30

A quick Google search seems to indicate that it's the thumbnail icons that Coda continually regenerates, which will render the HTML (including your Google Analytics code).

See this thread

The solution they offered is to collapse the preview thumbnails into text. I don't have a copy of Coda, so I don't know exactly how to do that, but it sounds pretty simple.

  • Thx, I wouldn't have never found that thread by myself. However, I tested this over the last few hours and it really seems to fix the problem. It's kinda spotty and unpredictable though. I can't really say how often Coda generates those thumbnails. I'll keep an eye on it for a little longer but I really think the problem's solved.
    – Marc
    Dec 1 '13 at 13:54

The better approach would be to exclude your development IP address/machines from Google Analytics.

This has the added advantage that your testing/use of the site won't account towards your analytical tracking data.

  • Yes, right. Unfortunately our ISP is using dynamic IP's but nonetheless we are blocking tracking our own actions on the actual site with the help of "Block Analytics" so everything's fine. Can always be optimized of course but for the moment my needs are satisfied.
    – Marc
    Dec 2 '13 at 10:48
  • @Marc Check out Ghostery too, not only can it block trackers, it can block all other annoyances too.
    – Michael P
    Dec 2 '13 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.