Implement Google Analytics on openbadges.org and beta.openbadges.org

VERIFIED FIXED

Status

Websites
Web Analytics
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: davida, Assigned: boozeniges)

Tracking

Details

(Reporter)

Description

5 years ago
Full website address:
  openbadges.org and beta.openbadges.org

Explain the goal and use-case of having web analytics on this website.

 - tracking traffic to and from the badges sites, evolution over time, etc. 

Do you have requirements to track user interactions on your website? For example, how many people have clicked a button on a page, filled out a form, or went through a pre-defined funnel?

 - not at this point, but sometime in the future, yes.


Define the people who should have access to the reports.

 - MoFo engagement & webdev
 - Badges team leadership (both product & technical)

ryan@mozillafoundation.org
rebeccah@mozillafoundation.org
ross@mozillafoundation.org
chris@mozillafoundation.org
erin@mozillafoundation.org
dascher@mozilla.com


(note: we just need the snippet/code, MoFo devs will implement).

Comment 1

5 years ago
Should both the root domain and sub domain be tracked separately or can I enable sub-domain tracking on the root domain?
(Reporter)

Comment 2

5 years ago
the latter.  simplicity FTW.

Comment 3

5 years ago
Code to add before closing </head>:

<script type="text/javascript">

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

Comment 4

5 years ago
I've enabled Subdomains of openbadges tracking in GA.

Comment 6

5 years ago
This profile should be enabled for premium by Friday. We'll keep this open until it is enabled for premium and data is coming in.

Comment 7

5 years ago
Has this been added to the website?

Comment 8

5 years ago
Ping

Updated

5 years ago
Assignee: nobody → chrismore.bugzilla
(Assignee)

Comment 9

5 years ago
Will be sending in the pull requests tomorrow - sorry for such a delay, I blame Christmas!!
(Assignee)

Comment 10

5 years ago
The PR's are put in - just assigning to myself so that I can help push them through
Assignee: chrismore.bugzilla → ross
Status: NEW → ASSIGNED
(Assignee)

Comment 11

5 years ago
At the moment in the GA dashboard I'm only seeing one domain set up for openbadges.org (should there also be a sub-domain filter for beta.openbadges.org?)

Comment 12

5 years ago
Here is the updated JS as I missed the setDomainName:

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-35433268-10']);
  _gaq.push(['_setDomainName', 'openbadges.org']);
  _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>

There is now two profiles for both the domain and subdomain. Sorry about that!
(Assignee)

Comment 13

5 years ago
Thanks!

I still only see the one but am guessing that's getting over the Google cache! Have updated the snippet in both the pull requests I had opened!

Comment 14

5 years ago
(In reply to Ross Bruniges from comment #13)
> Thanks!
> 
> I still only see the one but am guessing that's getting over the Google
> cache! Have updated the snippet in both the pull requests I had opened!

Please try now.
(Assignee)

Comment 15

5 years ago
Yeah, thanks looking good! Now just waiting on the PR's I sent making them up to live, thanks :cmore
(Assignee)

Comment 16

5 years ago
openbadges.org code is up, just waiting on the beta.openbadges.org stuff to go
(Assignee)

Comment 17

5 years ago
Looking at the GA dashboard is looks like we're getting data for beta.openbadges.org now :)
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 18

5 years ago
Verified that there is data coming in now. Thanks!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.