ShareThis provides a customizable sharing experience through the use of JavaScript and CSS based element selection. Sharing options make it possible to fully configure the sharing button on the page.
Direct-Post Share Widget Properties
ShareThis provides a customizable sharing experience through the use of JavaScript and CSS based element selection. While the default options may work for some, our provided sharing options make it possible to fully configure the sharing options of any button on the page.
Customizing individual sharing options creates more engaging shares by providing detailed information about individual elements (picture,video,article) on a page. This create a much richer share on sites who may have lots of content on a single page.
Global Share Properties
stLight.options
| Name | Definition | Default | Requirement |
|---|---|---|---|
publisher |
Your unique ShareThis publisher key |
null |
Required |
tracking |
Set to 'google' to enable GA tracking |
null |
Optional |
doneScreen |
Toggles Popular Shares screen on and off |
true |
Optional |
onhover |
Opens widget when user hovers over button |
true |
Optional |
embeds |
Disables embeddable objects while widget loads |
false |
Optional |
headerTitle |
Adds a Title to your ShareThis iframe |
false |
Optional |
headerbg |
Specify the back ground color of your header |
#CCCCCC |
Optional |
headerfg |
Specify the text color of your header |
#FFFFFF |
Optional |
Example
This code will create a ShareThis button with Google Analytics tracking enabled and embeddable content visible while the iframe is open
<span class="st_sharethis"></span> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript"> stLight.options({ publisher:'12345', tracking:'google', embeds:'true' }); </script>