How to Install ShareThis’ Tools on Drupal

Installing ShareThis Tools with Javascript Code

  1. Log in or sign up to the ShareThis Platform.
  2. Add your domain.
  3. Copy your unique ShareThis installation script.
    • You can find it in Step 1 of any App page (e.g., Inline Share Buttons, Sticky Share Buttons, Follow Buttons).
    • Or, you can find the same script in Settings Setup inside the Platform.
  4. Log in to your Drupal website. 
  5. For convenience, you could install and Activate the Header and Footer Scripts plugin to insert the script code:
  6. Navigate to Configuration page: Administer > Configuration > Development > Header Footer Scripts Page.
  7. Paste the code from Step 3 into Header Scripts.
  8. Click on Save Configurations.
  9. In the ShareThis Platform, open the app you want to use and click Enable App to activate it on your site.
  10. (Optional but recommended) Customize your app.
    • Choose between Smart Share Buttons or manual selection of networks.
    • Adjust colors to match your brand.
    • Set button size, shape, alignment, and enable share counts if desired.

Adding Inline ShareThis Tools

Inline tools require an extra snippet of code to work on your site. If you would like to install our Inline Share Buttons, Follow Buttons, Reaction Buttons, or Social Feed tools on your website, you will need to add a placement code wherever you want the tool to appear. To learn more about ShareThis Website tools, go here.

You can choose between:

Editing the Theme Code

  1. In your ShareThis Platform, select the ShareThis tool you want to use and copy the placement code. Depending on the tool you are installing, the code should look similar to this:<div class="sharethis-inline-share-buttons"></div>
  2. Log in to your Drupal website. 
  3. In the Manage administrative menu, navigate to Structure > Block layout > Custom block library (admin/structure/block/block-content).
  4. Click Add custom block.
  5. Name the block. Inside the Body, toggle the Source as HTML Code and place the ShareThis placement code.
  6. Click Save.
  7. Go to Block Layout and place the newly created blog wherever you want your buttons to appear.
  8. Click on Save Blocks.

Editing a specific article or post

  1. Create an article.
  2. In the body of the article, toggle the Source as HTML Code.
  3. Place the ShareThis placement code wherever you want it to appear in your article/post.
  4. Click Save.