How to Display Alexa Traffic Rank Statistics on Your Website

There are many reason why you may want to integrate your Alexa rankings into your website (For example, to show off your amazing Alexa Traffic Rank), and there are several things from Alexa.com that you can integrate on your pages: from a simple widget to a full graph.

alexa traffic rank

What is Alexa.com

Alexa.com is analyzing the web usage of millions of people who are using Alexa Toolbar as well as data obtained from a wide variety of traffic data sources. The data is computed by Alexa to finally get the traffic rankings shown on their website.

Being online since a very long time, Alexa.com has been able to develop there system to store a lot of information about almost every website on the internet. Their information database includes:

  • Traffic Stats (Traffic Rank, Reach, Pageviews, Pageviews/User, Time on Site, Search %)
  • Search Analytics (Search Traffic, Top Queries from Search Traffic, Search Traffic on the Rise and Decline, Search Advertising Metrics Highlights, High Impact Search Queries, Search Engine Marketing Activity and Opportunities)
  • Audience Demographics (Age, Gender, Education, Has Children, Browsing Location, Visitors by Country)
  • Contact Info
  • Reviews
  • Related Links (Sites relevant to website visitors and their interests)
  • Clickstream (Which sites did users visit immediately preceding this website, Where do visitors go after leaving this website)

As you can see, Alexa is collecting a huge variety of data about every single website. You can easily check the data regarding a website by visiting http://www.alexa.com and simply input the website url in the searchbox.

Alexa.com Data Widget Integration

Now that you know the kind of data Alexa is collecting about your website, you may want to easily integrate this data on your website.

The easiest thing to do is integrating one of Alexa Widgets to show some data to your visitors. Simply visit the Alexa Widgets page and grab the code of the widget you want to use.

You have a choice between Alexa Site Stats Button and Alexa Traffic Rank Button. Here is an example:

The big advantage of using this kind of widget over doing an image yourself is the usage of Javascript which allows it to be dynamically updated by Alexa every day.

Alexa.com Graph Integration

Using Alexa Widgets can be interesting in some cases but the big negative point is that it’s just showing your rank on a given day, but it’s not showing how your website is doing over time. This is the reason why you may want to integrate a graph. It can be very useful if, for example, you want to show to your potential advertisers the kind of traffic you are receiving.

The code to display some Alexa Traffic Rank graphs is a little harder to find, this is why I’m sharing it with you today. The following pieces of code will display different statistics of your website usage according to Alexa in form of graphs / charts. Replace amazon.com with your domain name to use these.

<!--Daily Traffic Rank Trend-->
<script language="JavaScript" type="text/javascript" src="http://xsltcache.alexa.com/traffic_graph/js/g/b/6m?&amp;u=http%3A%2F%2Fwww.amazon.com+++++"></script>

<!--Daily Traffic Rank Trend-->
<img alt="" src="http://traffic.alexa.com/graph?&amp;w=400&amp;h=220&amp;o=f&amp;c=1&amp;y=t&amp;b=ffffff&amp;r=6m&amp;u=amazon.com&amp;" />

<!--Daily Reach in Percent-->
<img alt="" src="http://traffic.alexa.com/graph?&amp;w=400&amp;h=220&amp;o=f&amp;c=1&amp;y=r&amp;b=ffffff&amp;r=6m&amp;u=amazon.com&amp;" />

<!--Daily Pageviews in Percent-->
<img alt="" src="http://traffic.alexa.com/graph?&amp;w=400&amp;h=220&amp;o=f&amp;c=1&amp;y=p&amp;b=ffffff&amp;r=6m&amp;u=amazon.com&amp;" />

Tip: You can replace r=6m (6 months) by r=3m (3 months), r=1m (1 month) or r=7d (7 days) to change the range of the graph.

Now you can display some nice traffic rank graphs on your website thanks to Alexa!

Sté Kerwer
Article written by Sté Kerwer (1993 Posts)
Bonjour from a french guy. My name is Sté Kerwer and Dukeo is my blog. I do most of the heavy lifting in here but from time to time, you may see some guest posts. To receive updates from Dukeo, follow us on Twitter or like us on Facebook.
If you enjoyed this article, Get email updates
JOIN FOR FREE

9 Comments (Add one)

  1. Mitch
    Mitch

    Thanks for sharing this!

  2. Flash Games

    I’ve been searching for this code for a while but was unable to find anything else than the basic badges… Thank you Stephane!

    1. Webdesign Inspiration

      Same for me! Even though I am not sure I’m going to use it right now…

  3. First Website
    First Website

    This is definitely some useful stuff and can save you a lot of time emailing back and forth with potential advertisers who want to have some insight about your website traffic…

  4. Eriii
    Eriii

    Thanks!

    Even though Alexa is a nice tool to have on your website or as a toolbar I think it tends to throw people off quite a bit.

    Alexa is just so inaccurate at times that your really can’t assess how well your website is doing overall.

    Do you recommend another way of which we can gauge the amount of traffic were getting versus competitors?

  5. rookie
    rookie

    Hi Stéphane .
    Maybe you can help me.
    I intregrate a Alexa traffic chart in my website, and I try to show a comparison with other webs, the graph shows good, but when I change the dimmensions parameters (w , h) then the graph does not work correctly.
    Please I accept any help !
    Thanks !

    1. Sté Kerwer

      Hey Rookie,
      I’ve just checked it and you’re right, it seems that when you try to change the graph dimension, it doesn’t show competition. Unfortunately, I didn’t play with these parameters before so I have no clue to help you :/
      If you find a solution somewhere, I’d be interested if you could let me know!

  6. Ariesjobs

    Thanks now i added alexa widget to my site. :)

    1. Sté Kerwer

      You’re welcome!

Leave a Reply

When posting a comment, please use your personal name, not your business name. I find it a lot more interesting to talk with people instead of talking with brands.