Web Analytics not being tracked in developer content

Bug #1441315 reported by Anne Gentle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslosphinx
Fix Released
Medium
Anne Gentle

Bug Description

This code is included in nova and swift. Wondering a few things:
- I don't see this in oslosphinx, how is it getting inserted?
- Why doesn't any other project except nova and swift get this tracking?

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
//Tracking docs.openstack.org/developer/nova only
var pageTracker = _gat._getTracker("UA-17511903-1");
pageTracker._setCookiePath("/developer/nova");
pageTracker._trackPageview();
} catch(err) {}</script>

Revision history for this message
Anne Gentle (annegentle) wrote :

Further triage: The nova and swift projects extend layout.html in their projects. I think it's better to enable tracking by project in oslosphinx itself.

We'll need to set page_tracker._setCookiePath("/developer/{projectname}");

likely by looking in conf.py.

Changed in oslosphinx:
assignee: nobody → Anne Gentle (annegentle)
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

If we can get the project name without having to explicitly set a variable, that would make adoption simpler. We should be able to get the name by running "python setup.py --name" in the correct directory. If we can't, we should make sure the template doesn't break or produce the wrong results if the variable isn't set at all.

Changed in oslosphinx:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

On second thought, maybe we can use the existing variable "project", which might not have great values for everything but should always exist.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslosphinx (master)

Fix proposed to branch: master
Review: https://review.openstack.org/171821

Changed in oslosphinx:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslosphinx (master)

Reviewed: https://review.openstack.org/171821
Committed: https://git.openstack.org/cgit/openstack/oslosphinx/commit/?id=7ddfe1c965474f28a5a4a25062e0c35243ad6452
Submitter: Jenkins
Branch: master

commit 7ddfe1c965474f28a5a4a25062e0c35243ad6452
Author: Anne Gentle <email address hidden>
Date: Wed Apr 8 16:27:26 2015 -0500

    Adds javascript footer for Google Analytics tracking

    - Ensures tracking is across all openstack.org web properties
    - Tracks only docs.openstack.org/developer/{{ project }} where
    project name is taken from conf.py

    Change-Id: Idfb2696f42ff17cbc6c3b72afcd2630b9ae01f0e
    Closes-bug: 1441315

Changed in oslosphinx:
status: In Progress → Fix Committed
Changed in oslosphinx:
milestone: none → 3.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.