Foundation/Metrics/Landing Page Tracking
These are the tracking requirements that should be in place before launching a landing page.
Contents
Webmaker Landing Pages
All landing pages should be hosted on webmaker.org, or a webmaker.org subdomain.
Measuring Traffic
Google Analytics
If GA is not included as part of an existing template, you need to add the following before the closing </head> tag:
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-35433268-12']); _gaq.push(['_setDomainName', 'webmaker.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>
Webmaker Referrer ID Tracking
If webmaker login is included in the page, the referrer ID (RID) tracking will be automatically available and no further action is needed.
If webmaker login is not included, we need to add the following script before the closing </head> tag:
<script src="https://stuff.webmaker.org/webmaker-rid/webmaker-rid.js" async></script>
Optimizely Code
This could should go immediately after the opening <head> tag
<script src="//cdn.optimizely.com/js/206878104.js"></script>
Measuring Conversions
Google Analytics Goal
- Make sure Goal Tracking is setup for the thing this landing page is trying to achieve (e.g. user creates a new accounts). If we do not already have a goal for this particular conversion, follow this link and file a bug under Webmaker Metrics.
Optimizely Conversion Goal
- Optimizely tests need to track an end conversion point to know which page/design/content variations has the biggest impact.
- If this is a static page view (eg .../thanks.html) we just need to ensure that page includes the Optimizely code shown above.
- If the goal is an interaction that could happen in multiple locations, or doesn't generate a pageview (for example creating a webmaker account in a modal window) we need to implement a custom conversion tracking goal. This is done via the webmaker-analytics bower module. See example below for email sign-ups.
For the email sign-up landing page
(As above) this page should already include:
- Google Analytics
- Webmaker RID
- Optimizely
For tracking conversions we need to include:
After an email address is successfully saved, fire the following JS where appropriate in the existing script:
analytics.event("Email Sign Up", {label: "Learn More About Webmaker"}); analytics.conversionGoal("WebmakerEmailSignUp");
Donation Pages (sendto.mozilla.org)
See example code for tracking BSD traffic and conversions using GA and Optimizely