Display alexa traffic image elsewhere
Published on Sun 03 Aug 2008 10:08 ( 1 year, 7 months ago)
Continue: http://dev.robertmao.com/2008/07/28/get-alexa-image-signature/
To include a alexa image in your web page, add following:
<script src="http://widgets.alexa.com/traffic/javascript/graph.js"></script>
<script src="http://widgets.alexa.com/traffic/session/?domain=www.alexa.com&date="></script>function setAlexaImage(sites)
{
var html = "http://widgets.alexa.com/traffic/graph/?r=6m&y=r&z=3&h=400&w=648&c=1";for (var i in sites)
{
html+= "&u[]="+sites[i];
}
var sig = AGraphManager.signature;
html+='&x=' + sig.expiry + '&check=www.alexa.com&signature='+sig.signature;
$("img#alexa_uv")[0].src=html;
}...
<img id="alexa_uv" src="#" />
...
I used jquery to get element, and used Alexa's original code to help to get the signature, but compose the image URL myself.
I didn't try to rewrite alexa's js code, I don't want to reverse engineer it or change anything there, so just use their own code.
Related posts:
- My GAE toy: Site Traffic Comparer
- Display alexa traffic image elsewhere
- Get Alexa image signature.
- HTML Combobox
- ASP.NET MVC is out! (though it's a preview version...)
- Some new sort of spams...really boring
- YSlow, web site performance tool
- The best analytics plugin I ever seen: Geotrack Plugin (2.0.2)
- Web analytics site compare sheet
- IP to country/location libraries
Search related in web:
Custom Search