How to track my Facebook share button with Google

2019-08-31 03:24发布

问题:

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!