AddThis Academy

An ever-growing library of resources to help you become a better online marketer.

URL Shortening

Our share-time url shortening makes it easy to integrate AddThis with your or click analytics. Twitter shares are automatically shortened with so you only need to use this feature if you want or analytics integration. Best of all, it works with vanity domains as well as the usual and domains.

Shortening With

To configure our URL shortener to use your account, you need to provide us with your login and API Key which you can retrieve from 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 the code below to your addthis_share configuration object and specify the services that you want to use shortening.  For example “twitter”, as shown here:

<script type="text/javascript">
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:

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”:

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.

URL Shortening
3.7 (73.33%) 3 votes

Was this article helpful to you?

Last modified:  May 3rd, 2018