Closed Bug 838873 Opened 11 years ago Closed 11 years ago

Implement Google Analytics on input.mozilla.org

Categories

(Input Graveyard :: Frontend, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cmore, Assigned: willkg)

References

Details

Attachments

(1 file)

Website: http://input.mozilla.org

Reports: Just out of the box ones

Users: mcooper@mozilla.com, jsocol@mozilla.com
Here is the code. It should be added just before the closing </head>, but for this website, it probably doesn't matter that much.

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-35433268-26']);
  _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>
Google has been emailed to enable premium.
Users in comment 0 have been added to the profile.
jsocol/mythmon: Here is the bug for input. Webtrends contract end date is March 21st, 2013. If you are not using the Webtrends data, you can just remove WT when you add GA.
GA premium has been enabled.
Assignee: nobody → mcooper
Can we also make sure that GA is added to m.input.mozilla.com too?

Will you need an export of any historical WT data before removing WT off of the site and adding GA?

You can add GA to the footer or wherever easiest on this website. No pressing need to put it in the <head> given our other conversations.
(In reply to Chris More [:cmore] from comment #6)
> Can we also make sure that GA is added to m.input.mozilla.com too?

That site is going away within a month.

> Will you need an export of any historical WT data before removing WT off of
> the site and adding GA?

needsinfo?cheng for the second question.
Flags: needinfo?(cwwmozilla)
Yes, sadly. Since the rewrite overlaps with this switch, we're going to need WT data to make sure we're not breaking something/horribly hurting our traffic.  Ditto because we're changing how users get to input as part of bug 841437.

Sorry, most other cases I'd have said no but too many changes and not enough ways to measure...
Flags: needinfo?(cwwmozilla)
:Cww: Do you have abilities in WT to export the data and reports in CSV format? If not, I can do it if you tell me what reports that you want exported and for how long. 

Can we get GA on the site soon so that we can compare GA to WT to help with the future cut over?
Just to make sure I am understanding this correctly, we need to 

1) Add GA to the old input site.
2) Compare GA's data to WT's data to get a baseline.
3) Add GA to the new input site.
4) After launch compare the GA data from new input to the GA data from old input to make sure nothing went horribly wrong.

Sound right?
(In reply to Mike Cooper [:mythmon] from comment #10)
> Just to make sure I am understanding this correctly, we need to 
> 
> 1) Add GA to the old input site.
> 2) Compare GA's data to WT's data to get a baseline.
> 3) Add GA to the new input site.
> 4) After launch compare the GA data from new input to the GA data from old
> input to make sure nothing went horribly wrong.
> 
> Sound right?

That sounds like a good plan. Just bad timing with the old|new input sites. 2013-03-21 is the contract end date with Mozilla and we cannot easily extend it.

What is the sub-domain of the staged new input site so that I can add it to GA's admin area? If not, we will not be able to verify that requests are coming through given the URL won't be input.mozilla.org immediately.
Component: Web Analytics → Frontend
Product: Websites → Input
I've added wkahngreene@mozilla.com to the GA side to have access to the reports. Once GA is added to a dev or stage instance, I can verify that I see the data coming in.
Chris, sorry this got lost. I was looking for this in the Input product, so sorry I missed it.

The domains in use by Input are:

Old Input:
Production: input.mozilla.org, m.input.mozilla.org
Stage: input.allizom.org, m.input.allizom.org

New Input:
Dev: input-dev.allizom.org, m.input-dev.allizom.org.

Note that the m. url on new Input is simply a different name. It shows exactly the same thing, and is just a backwards compatibility thing for Firefox for Android.
I just talked to Chris. Grabbing this to work on it now.
Assignee: mcooper → willkg
I added the GA code that Chris provided in this PR: https://github.com/mozilla/input.mozilla.org/pull/62

After it gets reviewed, I'll land it in the master branch and request for IT to push it to production.
Is it true that m.input.mozilla.org is going away and we don't need GA on it? Does willkg's PR also affect m.input.mozilla.org?
I created a separate profile for input-dev.allizom.org in GA so that we can verify it on dev before pushing to production. I could add stage, but it is probably not necessary for this change.
m.input.mozilla.org is served by the same software as input.mozilla.org--it's just the mobile side of the same site.

The new input doesn't need an m. hostname, but we'll continue to have m.input.mozilla.org for a while until we transition Firefox for Android. m.input.mozilla.org will be identical to input.mozilla.org and served by the same software.

Does that answer your questions?
input-dev.allizom.org is running Fjord (the new input). I didn't make any changes to Fjord. Changes to Fjord will happen in bug #845942.

Our stage and prod environments are running the old input software. This change will go to stage first, where we won't do much with it because stage only vaguely works. Then we'll push it to production.
Blocks: 845942
Ok, I will add stage and the m. profiles now.
There are 4 profiles now, input.mozilla.org, input.allizom.org, input-dev.allizom.org, and m.input.mozilla.org and all the users in this bug have access to them in GA. When this code lands on one of those instances, let me know and I will verify.
Created bug #846032 to push it out. Once it's out, I'll let Chris know.
Also, you can remove the Webtrends code in the footer.
This was pushed to production just now.

We verified that GA is seeing input -prod data and that the GA scripts are in the pages and the webtrends scripts are not.

Down with webtrends! Up with GA!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
I've also added cwang@mozilla.com to the profiles.
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: