javascript - Tracking multiple Facebook "Like" buttons on one page -
on blog have global "like" button in header embedded code:
<div id="fb-root"></div><fb:like href="http://www.domain.com/blog/" send="false" layout="button_count" width="120" show_faces="false" font="arial"></fb:like>
this shows on every page of site. in addition, i've got "like" buttons each post appears on site using code:
<div id="fb-root"></div><fb:like href="http://www.domain.com<? the_permalink() ?>" send="false" layout="box_count" width="55" show_faces="false" font="arial"></fb:like>
in <head>
of pages include facebook script (i replaced app id x's here):
<script src="http://connect.facebook.net/en_us/all.js#appid=xxxxxxxxxxxxxxx&xfbml=1"></script>
the buttons working well, i'm trying interaction these buttons , can't seem feedback first (global) button. in scripts.js
file loaded @ bottom of page have snippet of code tracking:
fb.event.subscribe('edge.create', function(targeturl) { console.log(targeturl); //_gaq.push(['_tracksocial', 'facebook', 'like', targeturl]); });
only first, global "like" button print targeturl
console. others on page don't print console.
what doing wrong here?
if site still in works, posts' urls live on web? if not, explain problem. buttons work correctly urls facebook can reach. if you're testing on staging server, sure buttons set staging urls.
Comments
Post a Comment