Commit 5223e9d3 by David Ormsbee

Merge pull request #995 from MITx/features/rocha/google-analytics-for-course-pages

Add google analytics to course info pages
parents 92063418 8ec2c34e
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35248639-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
......@@ -21,20 +21,9 @@
<meta name="path_prefix" content="${MITX_ROOT_URL}">
% if not course:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35248639-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<%include file="google_analytics.html" />
% endif
</head>
<body class="<%block name='bodyclass'/>">
......
......@@ -7,7 +7,12 @@
<%inherit file="../main.html" />
<%block name="headextra">
<%include file="../google_analytics.html" />
</%block>
<%block name="js_extra">
% if not registered:
%if user.is_authenticated():
## If the user is authenticated, clicking the enroll button just submits a form
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment