{"id":17,"date":"2011-07-22T16:58:00","date_gmt":"2011-07-22T10:58:00","guid":{"rendered":"http:\/\/promincproductions.com\/blog\/?p=17"},"modified":"2014-05-03T18:46:24","modified_gmt":"2014-05-03T12:46:24","slug":"facebook-like-click-events","status":"publish","type":"post","link":"https:\/\/promincproductions.com\/blog\/facebook-like-click-events\/","title":{"rendered":"Facebook Like Click Events"},"content":{"rendered":"<p>I wanted to track in our anaylitics suite the clicks of a specific Facebook Like button on our website.<\/p>\n<p>To implement this, you need to use the XFBML form of the <a href=\"http:\/\/developers.facebook.com\/docs\/reference\/plugins\/like\/\" data-lasso-id=\"18\">Facebook like button<\/a>.&nbsp; Place this code where you want the like button to show up on your website.<\/p>\n<p>Then the following listener code needs to be put in place; preferably in the footer or near the bottom of the page.<\/p>\n<p>This code will listen for the clicks on your button and execute whatever code you put in it.&nbsp; The first portion of the script, &#8220;edge.create&#8221; is for when a user Likes your page.&nbsp; The section portion, &#8220;edge.remove&#8221; is for if they unlike your page.<\/p>\n<p>With this you could create an overlay to ask them why they unliked your page, etc.<\/p>","protected":false},"excerpt":{"rendered":"<p>I wanted to track in our anaylitics suite the clicks of a specific Facebook Like button on our [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[10],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-facebook-development"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4BbcR-h","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":1,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":51,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/17\/revisions\/51"}],"wp:attachment":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}