Our Custom AddThis Code to use Bitly, Custom Title and Disable Cookies
14th June, 2012 in Technical 1 Comment
There are many options and configurations the AddThis code could have for your setup. We needed the following settings:
- Twitter username, to offer the option to people to follow AmityWeb when they Tweet our pages
- Bitly to shorten any URLs, when using Twitter
- Disable AddThis cookies for the EU Cookie Law
- Custom Title setup for Twitter (page Title, then the URL link)
Here's our code...
<div class="addthis_toolbox addthis_default_style"> <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet" tw:via="TWITTER_USERNAME"></a> <a class="addthis_button_google_plusone" g:plusone:size="medium"></a> <a class="addthis_counter addthis_pill_style"></a> </div> <script type="text/javascript"> var addthis_config = {data_use_cookies:false} var addthis_share = { url_transforms: { shorten: { twitter: 'bitly' }, }, shorteners: { bitly: { login: 'BITLY_USERNAME', apiKey: 'BITLY_KEY' } }, templates : { twitter : "{{title}} {{url}}" } } </script> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ADD_THIS_USERNAME"></script>
If you want a custom image to show on the post (e.g. on the Facebook page) then you should put this in the HEAD section of the page:
<link rel="image_src" href="path-to-image.jpg" />
Recent
22nd November, 2017 in
Amity is pleased to announce it's sister web design company has launched in Newport. http://nettlofnewport.co.uk will design & build, host & support and digitally market websites for customers in and around Newport, South Wales, using Amity as the technical backend. Nettl will also offer design & print material for marketing & exhibitions.
Did you know that approximately 96% of people leave a website without taking the action the website owner would like them to complete? Whether it’s buying a product, signing up to a mailing list or requesting a callback, the vast majority of people visiting your site do not do it!
28th November, 2016 in Advice
When did you last check the speed of your website? According to Google’s guide for webmasters, a good eCommerce website should load fully in under 2 seconds...
If your business isn’t currently using social media, now is the time to consider why that is.
25th October, 2016 in Advice, Amity News
December is the perfect time to kick-start campaigns and refresh your marketing. Even if the nature of your business isn’t remotely festive, your customers will appreciate the goodwill of a seasonal offer to two, or simply a friendly ‘Merry Christmas’ message.
Jamie Blacker 18th June, 2012 at 14:38 pm
I've just had to secure a page with an addthis plugin - it's surprisingly simple to do!
Just change the last line to reference: src="https://s7.addthis.com....
An important thing to note is that the tweet button doesn't currently support SSL so this will be blocked and depending on the browser might throw a popup at you.