random
1

Add LinkedIn Button To Your Site And Track Clicks With Google Analytics

So, you can now track your LinkedIn Share button clicks with Google Analytics It’s pretty much easy and so simple . But question arise how that's possible so Here’s how…


Add LinkedIn Button To Your Site And Track Clicks With Google Analytic

  • First Of All Get Your LinkedIn Button.
  • You can get your LinkedIn Button Code From The Developer Page
  • Here Is The Example Of Button Code.
Add LinkedIn Button To Your Site And Track Clicks With Google Analytic
Add LinkedIn Button To Your Site And Track Clicks With Google Analytics
  • You can change your “data-counter” variables to what to reflect to your preference for where the counter appears  like shown below.
  • Display above the button:  For data-counter=”top”.
  • Display to the right of button: For data-counter=”right”.
  • Display to the right of button:  For data-counter=”right”.
  • Now then you have to need add some additional parameter to the LinkedIn code provides in order to trigger the Google Analytic. Whenever  the web user shares your content or article via the LinkedIn Share Button: data-onsuccess="LinkedInShare"
  • Place The resulting Code Wthin The Both <body> ... </body> Tags Of Your File, Where You Wish The LinkedIn Share Button To Appear In Your Site.

<script type="IN/Share" data-counter="right" data-onsuccess="LinkedInShare"></script>

  • Now Its Time To Add Some JavaScript To Make It Usefull.
  • So, Make It Useful Place The following JavaScript  the “LinkedInShare” function should Be Within The <head> Tag In Your Site.
<!-- Google Analytics Social Button Tracking -->
<script type="text/javascript" src="/js/ga_social_tracking.js"></script>

<!-- LinkedIn Share Button tracking-->
<script type="text/javascript">
function LinkedInShare() {
_gaq.push(['_trackSocial', 'LinkedIn', 'Share']);
}
</script>
  • Now Its Time To View Your Tracking In To Your Analytic.
  • So, View Your Tracking Metrics, Just Click: Visitors > Social > Engagement.
Add LinkedIn Button To Your Site And Track Clicks With Google Analytics Reviewed by Ghulam Haider on 00:58:00 Rating: 5

No comments:

All Rights Reserved by Shouted Blog © 2014 - 2015
Designed by Ghulam Haider

Contact Form

Name

Email *

Message *

Powered by Blogger.