开发者

Getting Analytics on Syndicated / Offsite Pages

We produce content for pages outside of our domain. We'd like to be able to track metrics like hits, time on page, referrer, etc. etc. on these pages. We have looked at a lot of options incl开发者_如何转开发uding packaging our own js, using a simple tracking pixel, and even using something like Google Analytics and fudging it to work with our stuff.

In any case, curious as to what you all see as the best option for doing something like this.

Thanks!


You need something that you could embed in your content going on multiple sites to track its audience, isn't it ?

You could either:

  • use a sort of server-side Google Analytics tracking with a transparent gif on a url to a server you own, see http://code.google.com/p/serversidegoogleanalytics/ or http://sourceforge.net/projects/galvanize/
  • embed a transparent flash object in your content, built with http://code.google.com/p/gaforflash/ in AS3 mode so that it doesn't depend on any javascript in the page to work and send data to Google Analytics (you'll need to host the flash and used embed tags in your content, possible ?)
  • an audience tracker supporting tracking with transparent inline gif (not called through JS), for example by using the code within the tag, for example http://en.atinternet.com/.

Does it fit your requirements ?


My suggestion is that you host a js file somewhere which you control. Then include it on the page outside your domain.

<script type="text/javascript" src="http://mydomain.com/trackingscript.js"></script>

Or if you don't know if the script will run in "http" or "https":

<script type="text/javascript">
    var scHost = (("https:" == document.location.protocol) ? "https://" : "http://");
    document.write(unescape("%3Cscript src='" + scHost + "mydomain.com/trackingscript.js"' type='text/javascript'%3E%3C/script%3E"));
</script>

Inside there you can put GA tracking, your own tracking or whatever you like.

Depending on how you decide to track a <noscript> tag with a img tag inside could be useful to catch non javascript users.

To maintain your own tracking server (using a simple tracking pixel) might be quite a bit of work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜