This plugin will let you easily display your Alexa traffic button or graph. 
- Generate perfectly valid XHTML code
- Plugin comes with a Code Wizard to generate the code you need to add to your website
- Can be used to generate graphs for any website, not just your blog
- Monetize your blog by adding your Amazon ID!
- Download The Alexa Traffic Rank Button Generator Plugin.
- Extract the contents of
ald-alexa-button.zip
to wp-content/plugins/
folder. You should get a folder called ald-alexa-button
.
- Activate the Plugin in WP-Admin.
- Goto Options > Alexa Button. If you are upgrading from an earlier version, it is recommended that you click Default Options so as to clean up any old options.
- Use the Generator on that page to generate the code to add to your template file. Alternatively add
<?php if (function_exists('echo_alexabutton')) echo_alexabutton(); ?>
to use default options. Default is a Small Traffic Graph of three months.
echo_alexabutton()
The following options can be set through Options > Alexa Button:
- Website URL: Enter the web address whose traffic rank you want to display. If a blank string is passed to the function, then this value is used. By default your blog address is taken.
- Your Amazon ID: If you have an Amazon ID, you can enter this here. The ID will be embedded in the code.
The function takes the following parameters:
$wpURL
: The URL whose traffic graph / button you want to display. If blank, Website URL from the Options page is used.
$AmazonID
: The Amazon ID you want to pass. If blank the Amazon ID from the Options page is used.
$UnitType
: Enter t
for traffic button, s
for stat and g
for graph.
$subUnitType
: a
, b
, c
for the different types. Go play around see which you want best.
$dateRange
: Used only for the traffic graph. To be entered as e.g. 3m, 30d, 1y for 3 months, 30 days and 1 year respectively.
Add <?php if (function_exists('echo_alexabutton')) echo_alexabutton(); ?>
where you want to display the chat widget.
Note: Using if (function_exists('echo_alexabutton'))
in the above code ensures that your blog won’t break even if you deactivate the plugin.
I have also made available the function ald_alexabutton()
which has a return value instead of a echo. You can use it as follows:
$str = ald_alexabutton();
echo $str;
Lastly, you can reset to default options by clicking on Default Options. I recommend you do this once during upgrade if you are upgrading from any older version as it will clean up old variables which the plugin used.
- WordPress Widget Support
- Save different sets of code for ready use
Current Version is 1.0
]]>