Closed Bug 919061 Opened 12 years ago Closed 12 years ago

need GA code to track slider interactions on homepage redesign

Categories

(www.mozilla.org :: Pages & Content, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jbertsch, Unassigned)

References

Details

Hi Gareth- Could you please provide code to track: 1. hover and open interactions on the homepage slider? 2. newsletter sign ups 3. downloads 4. news arrow clicks 5. see more news clicks https://www-demo3.allizom.org/en-US/?v=1 Thx, Jen
We'll also have contribute clicks for locales that don't have news. Can we track those clicks as well as how many sign up on the contribute page? Though I guess we have tracking on /contribute already so it'll be a matter of counting conversions that came in from v=1 and v=2
Below are the requirements for tracking of the redesigned homepages. 1. Interactions with the homepage slider: window._gaq.push(['_trackEvent','Homepage Interactions', {'hover' OR 'click'},{Position in slider}:{list id for the panel}]); where {Position in slider} is the 1,2,3,4,etc and list id for the panel (eg. 'panel-mdn') We should also implement similar tracking on the carousel on the original home page, as it is a prerequisite for a future A/B test of the panels. 2. Newsletter sign-ups - set on submit: window._gaq.push(['_trackEvent', 'Newsletter Registration','submit', 'Registered for Mozilla Updates']); 3. Firefox Downloads - on click of the download button, please check and set the appropriate version (ie. Firefox Desktop OR Firefox for Android) window._gaq.push(['_trackEvent', 'Firefox Downloads','download click', {'Firefox Desktop' OR 'Firefox for Android']); Please note, that we need to set this download event on the Original homepage as well, so that we can use this event as the main conversion for our Homepage redesign GA experiment. 4. News Interactions - set on click of news links or navigation arrows For News links and 'See More News': window._gaq.push(['_trackEvent', 'Mozilla in the News Interactions','click', {Article URL}]); For News Navigation Arrows: window._gaq.push(['_trackEvent', 'Mozilla in the News Interactions',{'arrow up clicks' OR 'arrow down clicks'}, 'News Navigation Arrows']); 5. Contribute / Get Involved Button - set on click, window._gaq.push(['_trackEvent', 'Get Involved Interactions','clicks', 'Get Involved Button']); Let me know when these have been implemented on demo3 and I will review to make sure the data is flowing into GA correctly. Also, feel free to ping me or set up a vidyo call if you need any further clarification. Thanks! Gareth
This is up on demo3. Hope I did that right...
Hey Craig, I reviewed the page and am seeing some data flow into GA, but not others. Here's a summary: What's Working: 1. News Interactions - confirmed that I can see events come in for navigational arrows, article clicks and see more news clicks. 2. Get Involved - confirmed that I can see events coming into GA for clicks on the 'Get Involved' link. Needs Updating: 3. Firefox Download Events - currently i am seeing an event being triggered on the download button, however it was for the wrong version of Firefox. When downloading the desktop version, i was seeing a 'Firefox for Android' event being triggered. Can you please review? 4. Newsletter Registration - i can see some data come into GA, however it looks like multiple events are being triggered on submit. Can you please review? 5. Interactions for Homepage Slider - am not seeing any data come into GA for clicks or hover. Any questions, or if you would like to review together, let me know. Thanks! Gareth 3. Currently
As a follow-up...i checked only https://www-demo3.allizom.org/en-US/?v=1. Will check v=2 now and will update the bug.
Looks like the same comments apply as in comment#5 for v=2. Let me know when the changes are up and i'll take another look. Thanks!
(In reply to Gareth Cull [:garethc] from comment #5) > Needs Updating: > > 3. Firefox Download Events - currently i am seeing an event being triggered > on the download button, however it was for the wrong version of Firefox. > When downloading the desktop version, i was seeing a 'Firefox for Android' > event being triggered. Can you please review? Some faulty logic meant it was always treated as Android. Fixed now. > 4. Newsletter Registration - i can see some data come into GA, however it > looks like multiple events are being triggered on submit. Can you please > review? It turns out we already have GA tracking on the newsletter form so we were doubling up. I've removed the extra tracking event so that should be clean now. > 5. Interactions for Homepage Slider - am not seeing any data come into GA > for clicks or hover. I think misinterpreted the format so I've been firing a malformed tracking call. I made a function that takes in variables for action, position, and panel ID, and when that function is called it fires off something like this: window._gaq.push(['_trackEvent','Homepage Interactions', 'hover', '1', 'panel-mission']); But looking at your original comment again, I think it should instead be: window._gaq.push(['_trackEvent','Homepage Interactions', 'hover', '1:panel-mission']); Is that correct? I wasn't sure if the colon was meant to be part of a single string parameter or if position and ID were meant to be separate. I suspect I guessed wrong the first time. I've changed it to the second version now, but let me know if I'm still wrong. These changes have all been pushed to demo3, if you can verify at your earliest convenience. Both versions of the page use the same script so all the events are the same, we just need to track which version they're coming from.
It's coming along. Some data is working now, but still am missing some things: 3. Firefox Download Events - i can see Firefox Desktop being set on click now, however it is also setting 'Firefox Desktop' when i click on the Android button in a mobile browser. 4. Newsletter - seeing this event trigger once now, but when i go immediately back to the page, it does not fire again on submit, unless i do a full refresh and re-submit. 5. Interactions for Homepage Slider - i am seeing the hover events come through for each of the panels, but not the clicks on each panel. The way you have the Event label now is correct (ie. 1:panel-mission). Thanks!
(In reply to Gareth Cull [:garethc] from comment #9) > 3. Firefox Download Events - i can see Firefox Desktop being set on click > now, however it is also setting 'Firefox Desktop' when i click on the > Android button in a mobile browser. Doh, my previous fix didn't fix it at all. Instead of always returning true for Android it was always returning false for Android. But I think I actually do have it fixed now. > 4. Newsletter - seeing this event trigger once now, but when i go > immediately back to the page, it does not fire again on submit, unless i do > a full refresh and re-submit. It's using the preexisting tracking code now so I imagine this same thing is happening throughout the site. Can you test another page and see if this is happening everywhere the form appears? I'm not sure what fix might be. > 5. Interactions for Homepage Slider - i am seeing the hover events come > through for each of the panels, but not the clicks on each panel. The way > you have the Event label now is correct (ie. 1:panel-mission). Thanks! The click-to-expand action only happens in small viewports. You probably need try on a mobile device, otherwise it might open on hover before you get the chance to click, even if you make your window narrow. Once the panel is open you'll be clicking on the inner link and not the panel itself so it may not register as a click on the panel unless you're on mobile (where hover doesn't happen). I've also just added a focus event for keyboard accessibility, and a click/tap might be firing focus as well as click. I need to do more mobile testing. If we get double actions on click and focus maybe we just won't track focus at all, or just filter the events better.
Thanks Craig. We are almost there! 3. Firefox Downloads - this fix worked! I'm seeing both Firefox Desktop and Android events for desktop and mobile respectively. Thanks. 4. Newsletter Registration - This should be fine for now. I'm really only interested in the first interaction. Not a show stopper. 5. Interactions with the slider - I'm not seeing clicks through on each panel to their destination page on desktop. Even when i click only the link in the panel. Can you check this? Also, when on mobile, hover, click and focus seem to all be firing at the same time when i open a panel. When I click through to the destination page, it seems to work correctly and just sends a click event.
Last batch of updates are on demo3. I think we might finally have it. * Now tracking "open" events for each panel, separate from "click" events when the links are clicked. * Also tracking promo clicks, downloads, and news clicks on the old home page as well.
Hey Craig, Appreciate all your work on this. I can now see open events instead of hover, which is a good change. Click events on the panel are also coming through. Two more minor changes and I think we are good to go. 1. Can we please set the open Event Label as [position in slider]:[list id for panel] like we have for the click? See the following screencap for more details: http://cl.ly/image/0d0A3x24452I 2. On mobile, everything seems to be working well, except when I open a panel. It seems to be firing the open event twice. That's it! Thanks again!
(In reply to Gareth Cull [:garethc] from comment #13) > 1. Can we please set the open Event Label as [position in slider]:[list id > for panel] like we have for the click? See the following screencap for more > details: http://cl.ly/image/0d0A3x24452I Sorry, had things in the wrong order. Easy fix, will update demo3 shortly. > 2. On mobile, everything seems to be working well, except when I open a > panel. It seems to be firing the open event twice. This is because the panel opens on click as well as on focus, and clicking it also gives it focus so it's firing twice. I'm working on handling this in a smarter way to prevent double (and sometimes triple) events. Will let you know when it's ready for retesting. Thanks for your patience!
Hey Craig, Any update on the last round of fixes? Gareth
(In reply to Gareth Cull [:garethc] from comment #15) > Hey Craig, > > Any update on the last round of fixes? Yes, sorry, those last two things should be fixed on demo3. If you can verify we'll consider this bug resolved.
We're live! www.mozilla.org/en-US/?v=1 www.mozilla.org/en-US/?v=2
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
verified fixed on prod
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.