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. Best of all, it works with vanity domains as well as the usual bit.ly and awe.sm domains.
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 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:
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”: 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.
Was this article helpful to you?
Last modified: May 3rd, 2018