I need to unlock content when someone shares the post with pinterest, and I can't find a callback function on pinterest button. Is there any way to do this?
3 Answers
You could wrap the pinterest link with a span and add a jQuery click event to the span to at least know that the pinit button was clicked. That's about the best you can do until they release a real callback so you can know that an item was actually pinned.
<span id="pin-container"><a data-pin-config="beside" href="http://pinterest.com/pin/create/button/?url=[your_url]&media=[your_image]&description=[your_desc]" data-pin-do="buttonPin" ><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></span>
$('#pin-container').click(function () {
        alert('clicked pin button');
    });
- 1,144
 - 17
 - 32
 
As said before, the API is not public yet. The best workaround (I just tested it, and it works in my scenario) that I've found so far is http://www.seomoves.org/blog/tools/tracking-pins-with-the-pinterest-button-2595/
That link only lets you determine if the Pin Button was clicked, not if they actually made the share. Hope that helps a little!
- 399
 - 10
 - 28
 
A workaround is posted here:
http://www.lunametrics.com/blog/2012/03/12/tracking-pinterest-event-tracking/
Until Pinterest opens up a public API and a non-iFrame tracking button, this is about as good as you'll get.
- 33
 - 2
 
- 
                    I'll try this and tell you the results, could be a temporary solution until they launch the new API. thanks – Laura Apr 04 '12 at 13:45
 - 
                    1That solution is useless, it does not actually track if the user pinned something. This will not be possible until they release their new API. – Tyler Apr 03 '12 at 04:30
 - 
                    This tracks the click on the button, not the action of successfully pinning content on pinterest. – Vlad Nicula Nov 08 '12 at 18:22
 - 
                    This is NOT a solution – freedev Jul 30 '13 at 10:40