Our share-time url shortening makes it easy to integrate AddThis with your bit.ly or awe.sm click analytics. Twitter shares are automatically shortened with t.co so you only need to use this feature if you want bit.ly or awe.sm analytics integration.
Shortening With Bit.ly
To configure our URL shortener to use your bit.ly account, you need to provide us with your bit.ly login and API Key which you can retrieve from https://bitly.com/a/settings/advanced. Once you have that, sign in to AddThis, go to the profile settings page and select the profile you'd like to link to your bitly account. In your profile settings you'll find a form that lets you enter your bitly login and API key. Your key will be stored safe on our servers and won't be exposed in your site's html. Lastly you'll need to update your sharing config. If you're using our sharing endpoints, pass shortener=bitly on your requests. If you're using our sharing buttons, add this to your config and specify the services that you want to use shortening:
var addthis_share = {
// ... other options
url_transforms : {
shorten: {
twitter: 'bitly'
}
},
shorteners : {
bitly : {}
}
}
Make sure your pubid is correctly configured, else we won't be able to look up your key. If you use our sharing endpoints your url might look like this:
http://api.addthis.com/oexchange/0.8/forward/twitter/offer?url=http://www.csmotorclub.com/2011/10/2011-chumpcar-2525-25-at-nelson-ledges/&pubid=numbakrrunch&shortener=bitly
To test whether it worked, grab the bitly url out of the resulting tweet and add a '+' to the end to inspect it. You'll notice that mine says "numbakrrunch saved this link": https://bitly.com/LQ1iWB+
Note: this feature used to require you to put your bitly apiKey in the AddThis code on your site. It you've set that up we recommend taking the key off your site and saving it on our servers using this method, that will help keep your key safe.
Shortening With Your Awe.sm Account
To shorten URLs with your Awe.sm account you need to provide us with your Account API Key which you can retrieve from http://create.awe.sm/home. Select your account name from the “settings” pull down menu in the upper right hand corner of the page. The Account API Key is a long hexadecimal string, your awe.sm Sharer ID will not work here. Please note that you need to have an awe.sm account to use this feature.
Then add the following code to the addthis_share configuration object on your page:
var addthis_share = {
// ... other options
url_transforms : {
shorten: {
twitter: 'awesm'
}
},
shorteners : {
awesm : {
key: '5a8f...'
}
}
}
Note that at present, you must include your awesm API key on your page to integrate--meaning that it's technically exposed to any site visitor, who could use it themselves. In the near future, we'll support storing it securely server-side.