Merge lp:~svwilliams/loco-team-portal/google-analytics into lp:loco-team-portal

Proposed by Stephen V. Williams
Status: Merged
Approved by: Adnane Belmadiaf
Approved revision: 499
Merged at revision: 499
Proposed branch: lp:~svwilliams/loco-team-portal/google-analytics
Merge into: lp:loco-team-portal
Diff against target: 24 lines (+12/-1)
1 file modified
loco_directory/templates/base.html (+12/-1)
To merge this branch: bzr merge lp:~svwilliams/loco-team-portal/google-analytics
Reviewer Review Type Date Requested Status
Adnane Belmadiaf Approve
Review via email: mp+81516@code.launchpad.net

Commit message

Added google analytics code to header of base.html.

To post a comment you must log in.
Revision history for this message
Adnane Belmadiaf (daker) wrote :

Which e-mail have you used to create this analytics code ?

review: Needs Information
Revision history for this message
Stephen V. Williams (svwilliams) wrote :

Its an email I received from Chris

Here are the instructions for implementing Google Analytics on our website.

For more information, see http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

Copy the following code, then paste it onto every page you want to track immediately before the closing </head>tag.

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-26763972-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>

Thank you for your assistance!

Revision history for this message
Adnane Belmadiaf (daker) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/templates/base.html'
2--- loco_directory/templates/base.html 2011-10-05 00:50:53 +0000
3+++ loco_directory/templates/base.html 2011-11-08 02:30:29 +0000
4@@ -6,8 +6,19 @@
5 {% block logo_text %}{% trans "LoCo Team Portal" %}{% endblock %}
6
7 {% block extrahead %}
8- <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/newstyle.css" />
9+ <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/newstyle.css" />
10 <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script>
11+ <script type="text/javascript">
12+ var _gaq = _gaq || [];
13+ _gaq.push(['_setAccount', 'UA-26763972-1']);
14+ _gaq.push(['_trackPageview']);
15+
16+ (function() {
17+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
18+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
19+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
20+ })();
21+ </script>
22 {% endblock %}
23
24 {% block top_nav_login_links %}

Subscribers

People subscribed via source and target branches