Hi guys,

Am a super-novice programmer - am in the middle of building our new website - and need some help getting a great script from Bit.Ly to work.

Code/info (from Bit.Ly) is:


bit.ly Tweet & Track Chicklet
Make it easy for your readers to share links to your content on Twitter and track who clicks them.
Copy these two lines into the head tag of your HTML page:

<script type="text/javascript" charset="utf-8" src="<bit.ly>/javascript-api.js?version=latest&login=tweettrackjs&apiKey=R_7e9987b2fd13d7e4e881f9cbb168f523"></script>
<script type="text/javascript" charset="utf-8" src="<s.bit.ly>/TweetAndTrack.js?v=1.01"></script>

NOTE: http url link prefix removed (substituted by <bit.ly>, etc.) to comply with SitePoint requirments.

Then, add this with each item on your blog or content site:

<a href="#" onclick="return TweetAndTrack.open(this, '{Permalink}');"><span style="display:none;">Your custom message - {Title}</span>Tweet & Track</a>

Substitute whatever template tag or variable you use for permalinks for {Permalink} and your Post Title template tag for {Title}. You can also add a common custom message where it says "Your custom message - ". This example will work on Tumblr.


I have inserted the code on my page and the link works (ie. a new Twiter window is launched with the message entered - ready to send) - but the resulting Bit.Ly url does not work. This, I am told, is due to the {Permalink} reference (for Tumblr) - which doesn't work outside a blog environment? Can anyone help me adapt the script/usage to suit a basic website?

I would really appreciate any support here - even a point in the right direction.

Thank you very much - look forward to hearing from you.