Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question

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
share|improve this answer
    
Does Pinterest allow something like that too? –  Derfder Jul 14 '13 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 '13 at 10:30
    
I added Nick's Pinterest to the post, and also "share via email". –  Stephen Ostermiller Jul 14 '13 at 11:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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