I don't have any Ads and I am not using Google Analytics. I am using Piwick instead.

But I still want to be able to share the content via share buttons on Twitter, Facebook, Google+ etc.

The problem is that a lot of my users Adblock, so my question is can I implement these share buttons via something that will bypass that?

Maybe some additional JavaScript that will activate the button only when user click on it?

Or the only solution is to have external links(linked images) that will look like buttons and they will after click connect to the social medium of choice?

1 Answer 1


You can do social media share buttons without using JavaScript that would allow the sites to track your users. All the sites support links for sharing content.

For this to work you need to be able to URL encode some information about your page to insert into links:

  • URL: http://example.com/mypage.html -> http%3A%2F%2example.com%2Fmypage.html
  • TITLE: My Page Title -> My%20Page%20Title
  • SITE: My Site -> My%20Site

Then insert those into the following share URLs and link on the page to:

  • Facebook: http://www.facebook.com/sharer.php?u=ENCODED_URL&t=ENCODED_TITLE
  • Twitter: https://twitter.com/intent/tweet?source=ENCODED_SITE&text=ENCODED_TITLE&url=ENCODED_URL
  • Google+: https://plus.google.com/share?url=ENCODED_URL
  • Pinterest: http://pinterest.com/pin/create/button/?url=ENCODED_URL&media=ENCODED_IMAGE_URL‌​&description=ENCODED_TITLE
  • LinkedIn: http://www.linkedin.com/shareArticle?mini=true&url=ENCODED_URL&title=ENCODED_TITLE&summary=&source=ENCODED_SITE
  • Email: mailto:?subject=ENCODED_TITLE&body=ENCODED_URL
  • Does Pinterest allow something like that too?
    – Derfder
    Jul 14, 2013 at 10:23
  • @Derfder Yes. The format is http://pinterest.com/pin/create/button/?url=ENCODED_URL&media=ENCODED_IMAGE_URL&description=ENCODED_TITLE See the Pinterest button docs for more info.
    – Nick
    Jul 14, 2013 at 10:30
  • I added Nick's Pinterest to the post, and also "share via email". Jul 14, 2013 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.