Closed Bug 1100065 Opened 10 years ago Closed 10 years ago

F.M.O - "Live Version" - Implement GA Track Code

Categories

(Mozilla Foundation Communications :: Website, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mavis, Assigned: thecount)

Details

(Whiteboard: [EOYFR2014][studio mofo][f.m.o][p1])

Attachments

(1 file)

Hi Adam,

I have started working on the 2014 EOY version of fundraising.mozilla.org.  I see a GA tracking code in the code base but I'm not sure if that was just for last year.  Could you please verify for me?

Thank you!
Mavis

==========

What I see in the code

var _gaq = _gaq || [];
var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', 'UA-35433268-5']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_setAllowAnchor', true]);
_gaq.push(['_trackPageview']);
I think it should be fine to continue using the same code as last year, but I will double check for you.

I've just requested access to that GA profile, and will let you know when I know more (Bug 1100323)
Status: NEW → ASSIGNED
Flags: needinfo?(adam)
(In reply to Adam Lofting (:adamlofting) from comment #2)
> I think it should be fine to continue using the same code as last year, but
> I will double check for you.

I was wrong :)

I'm not sure where the old GA account was setup, but it wasn't in the main Mozilla Google Analytics account so we have setup a new profile there instead.

The code to use is:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-49796218-14', 'auto');
  ga('send', 'pageview');

</script>

This replaces: https://github.com/mozilla/eoy-fundraising/blob/2e1481222a0bb30336d31980ec609f4abd8105fb/themes/OneMozilla-child/header.php#L60-L80
Assignee: adam → mavis
Flags: needinfo?(adam)
Summary: F.M.O - "Live Version" - GA Track Code → F.M.O - "Live Version" - Implement GA Track Code
Guessing this is p1 since it's F.M.O related. Andrea, please correct if wrong.
Whiteboard: [EOYFR2014][studio mofo][f.m.o] → [EOYFR2014][studio mofo][f.m.o][p1]
Cool. Thanks, Adam! I'll update the code.
Assignee: mavis → scott
Comment on attachment 8525101 [details] [review]
https://github.com/mozilla/eoy-fundraising/pull/2

even harder code review done :)
Attachment #8525101 - Flags: review?(mavis) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
--- live on staging ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: