UI Configuration
The same object format can be used for specifying global or instance configuration. To specify global configuration, the special name addthis_config must be used.
For example:
<script type="text/javascript"> var addthis_config = { // ... members go here } </script>
UI Configuration Options
Name | Description | Type | Default |
---|---|---|---|
pubid | Your AddThis profile ID. Always global to a page. | string | none |
services_exclude | Services to exclude from all menus. For example, setting this to 'facebook,myspace' would hide Facebook and MySpace on all our menus. Always global. |
string (csv) of service codes | none |
services_compact | Services to use in the compact menu. For example, setting this to 'print,email,favorites' would result in only those three services appearing. Always global. |
string (csv) of service codes | We regularly optimize the default list based on our data. |
services_expanded | Services to use in the expanded menu. Useful if very few services are desired — specifying a long list via services_exclude could be tiresome, and wouldn’t catch a new service added later. For example, setting this to 'bebo,misterwong,netvibes' would result in only those three services appearing in the expanded menu. Always global. |
string (csv) of service codes | all the services AddThis offers |
services_custom | Specify your own AddThis bookmarking service like so:
{name: "My Service", url: "http://share.example.com?url={{URL}}&title={{TITLE}}", icon: "http://example.com/icon.jpg"} . All three fields must be present for each custom service. Always global.Analytics will appear in your account under the service’s base domain name (no subdomains–“example.com” in this case), and the first service specified will appear in the compact menu unless |
array of custom service objects | none |
ui_click | If true , the compact menu will never appear upon mousing over the regular button. Instead, it will be revealed upon clicking the button. |
boolean | false | ui_disable | If true , the compact menu will never appear upon mousing over or clicking on the regular button. Upon clicking, the expanded service menu will appear instead. |
boolean | false |
ui_delay | Delay, in milliseconds, before compact menu appears when mousing over a regular button. Capped at 500 ms. | integer | 0 |
ui_hover_direction | Normally, we show the compact menu in the direction of the user’s browser that has the most space (i.e., a button at the bottom of the page will pop up, and vice versa). You can override this behavior with this setting: 1 to force the menu to appear “up”, -1 to force the menu to appear “down”. |
integer | 0 |
ui_language | For forcing the menu to use a particular language, specified via ISO code. For example, setting this to "sv" would show the menu in Swedish. Note: Regardless of the number of times it’s specified, only one language is supported per page. |
string | User’s browser |
ui_offset_top | Number of pixels to offset the top of the compact menu from its parent element | integer | 0 |
ui_offset_left | Number of pixels to offset the left of the compact menu from its parent element | integer | 0 |
ui_508_compliant | If true , clicking the AddThis button will open a new window to a page supporting sharing without JavaScript. |
boolean | false |
ui_tabindex | Sets the global value of the tabindex for all AddThis buttons on the page. | integer | 1 |
data_track_addressbar | Set to true to allow us to append a variable to the page URL. Measures how often users share your site by copying the page URL from their address bar. Always global. | boolean | false |
data_track_clickback | Set to true to allow us to append a variable to your URLs upon sharing. We’ll use this to track how many people come back to your content via links shared with AddThis. Highly recommended. Always global. | boolean | true |
data_ga_property | Google Analytics property ID (generally a serial number of the form UA-xxxxxx-x). If set, we’ll send AddThis tracking events to Google, so you can have integrated reporting. | object or string | null |
data_ga_social | Google Analytics social interaction analytics. | boolean | null |
Section 508 Compliance
You can make your AddThis button Section 508 compliant by using ui_508_compliant
.
<script type="text/javascript"> var addthis_config = { ui_508_compliant: true } </script> <a class="addthis_button"></a>
Last modified: February 2nd, 2017