Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 93 lines (76 sloc) 3.41 KB
<html xmlns=""
xmlns:fb="" >
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Social Demo</title>
<link href="main.css" rel="stylesheet" type="text/css"></link>
<link rel="stylesheet" type="text/css"
<!-- Google Analytics Tracking Code -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345-6']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
<!-- Google Analytics Social Button Tracking -->
<script src="ga_social_tracking.js"></script>
<div id="fb-root"></div>
window.fbAsyncInit = function() {
appId : null, // ENTER your FB App ID
//channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
_ga.trackFacebook(); //Google Analytics tracking
// Load the SDK's source Asynchronously
(function(d, debug){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); = id; js.async = true;
js.src = "//" + (debug ? "/debug" : "") + ".js";
ref.parentNode.insertBefore(js, ref);
}(document, /*debug*/ false));
<div class="header">
<h1>Google Analytics Social Tracking Demo</h1>
<h3>Facebook via JS-SDK async</h3>
<ul id="nav">
<li>Other Demos:</li>
<li><a href="facebook_js_async.html">Facebook Async</a></li>
<li class="item"><a href="facebook_js_sync.html">Facebook Sync</a></li>
<li class="item"><a href="twitter_js_async.html">Twitter Async</a></li>
<li class="item"><a href="twitter_js_sync.html">Twitter Sync</a></li>
<p>This page demonstrates how to track Facebook like buttons which are loaded asynchronously on the page.<br>
See <a href="">Facebook developer docs</a>
on loading the like button.<br>
See the <a href="ga_social_tracking.js">JavaScript Source Code</a> to learn how to this is being tracked.</p>
<p>Like this Page! <fb:like></fb:like></p>
<li><a href=""></a>
<fb:like href="" send="true" layout="button_count"></fb:like></li>
<li><a href=""></a>
<fb:like href="" send="true" layout="button_count" ></fb:like></li>
<li><a href=""></a>
<fb:like href="" send="true" layout="button_count"></fb:like></li>
You can’t perform that action at this time.