Closed Bug 760714 Opened 12 years ago Closed 12 years ago

Add Webtrends onClick events to newsletter sign up pages

Categories

(www.mozilla.org :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: cmore, Assigned: jpetto)

References

Details

We currently are not tracking how many people click the sign up form from the footer of our new Bedrock pages. Please add the onClick events as described here https://bugzilla.mozilla.org/show_bug.cgi?id=759595#c6 for this code: https://github.com/mozilla/bedrock/blob/master/apps/mozorg/templates/mozorg/base.html
Assignee: nobody → jon
Target Milestone: --- → 3.0
Blocks: 759595
Just to clarify...

We have the tracking code already set up on this page: http://www.mozilla.org/en-US/

From the 759595 thread, it looks like we need tracking code on this page: https://www.mozilla.org/en-US/firefox/fx/, which references the following file:

https://github.com/mozilla/bedrock/blob/master/templates/base.html

I have updated the above file on my local branch with the tracking code specified in the 759595 thread.

Please confirm this is the desired fix, after which I'll commit my changes.
Jon: Yeah, you're right. The two pages use different forms. Yes, this is where the code should be added. Thanks!
Cool. Just issued a pull request to the dev branch.
Rik: Can you check to see where this commit is at?
Rik: any comment here?

Jon: Do you have the specific revision number?
Target Milestone: 3.0 → Future
Here's a link to the pull request. Looks like it was merged into dev 2 months ago.

https://github.com/mozilla/bedrock/pull/147
Yeah, the dev branch is poorly named since it is only for "demo/wip" purposes. Nothing gets merged from dev to master.

I'll cherry-pick this.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Forgot to say that it went to production yesterday.
Nice! Thanks, Rik.
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Still not seeing this in the production page @ https://www.mozilla.org/en-US/firefox/fx/. We don't not see the tracking code fire on the submit event
Jon: Please open the web console and verify that you do not see a webtrends request onSubmit. Thanks
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Hm, it looks like the issue concerns the use of multiple base templates.

For pages that use the base template referenced in the first post of this bug (https://github.com/mozilla/bedrock/blob/master/templates/base.html), the WebTrends code is as requested:

https://www.mozilla.org/en-US/firefox/central/

For pages that use the newer responsive base template (https://github.com/mozilla/bedrock/blob/master/templates/base-resp.html), there's no WebTrends code added:

https://www.mozilla.org/en-US/firefox/fx/

I would guess these templates differ due to the WebTrends commit being merged after the responsive template had already been created using the non-responsive template as a starting point (copy/paste maybe?).

The quick and easy fix would be to simply update the responsive template to include the WebTrends tracking code. However, a better solution would probably be to extract the signup form code to a shared partial that both templates could reference.

Along these lines, there seem to be 2 other templates with differing code:

https://github.com/mozilla/bedrock/blob/master/apps/mozorg/templates/mozorg/base-resp.html
https://github.com/mozilla/bedrock/blob/master/apps/mozorg/templates/mozorg/base.html

These templates have a similar issue to the templates above - the email form code is duplicated. However, these templates do match.

You can see the responsive version of these templates in use on the home page: https://www.mozilla.org/en-US/

I'm not sure if the WebTrends code used in these templates is correct or not.

Chris - what do you think? Do the easy fix for now and tighten up later?
Jon: Please duplicate the code for now. The non-responsive templates will disappear.
Just issued a pull request to dev:

https://github.com/mozilla/bedrock/pull/328
This has been pushed to prod.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Working now. Thanks!
You need to log in before you can comment on or make changes to this bug.