How to track my Facebook share button with Google analytic or any other tracking measure

青春壹個敷衍的年華 提交于 2019-12-25 05:08:05

问题


I have this share button on my site:

.shr-btn-scl .facebookbtn{background-image:url(https://lh6.googleusercontent.com/-Odsu2qlGN6w/U4xV7l9bH-I/AAAAAAAACKE/hQLdHC9ZXJQ/w200-h49-no/face+un.png);display:block;
width:140px; height:30px; background-repeat:no-repeat;

}

 <li><a class='facebookbtn' data-title='Facebook' expr:href='&quot;http://www.facebook.com/sharer.php?u=&quot; + data:post.url + &quot;&amp;title=&quot;+ data:post.title' onclick='window.open(this.href, &apos;windowName&apos;, &apos;width=550, height=600, left=24, top=24, scrollbars, resizable&apos;); return false;' rel='nofollow'/>
                        </li>

and i would like to track at least the number of clicks on it (independently from the fact that sharing is finalized or not). Can i track clicks on it with Google analytic? Please be specific in your help since i already read explanations from Google and i'm unable to understand well what to do. Example detailed coding would be very helpful.Thank you!

来源:https://stackoverflow.com/questions/24214041/how-to-track-my-facebook-share-button-with-google-analytic-or-any-other-tracking

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!