To the download button please add the following data attribute: data-download-location = "<location>" //acceptable values include 'nav', 'primary cta', and 'other'
(In reply to pgerman from comment #0) > To the download button please add the following data attribute: > > data-download-location = "<location>" //acceptable values include 'nav', > 'primary cta', and 'other' Peter, We can easily add values for this to common elements that appear on multiple pages (e.g. global nav etc), but do you have a list of pages that you would like to target here with other values? One approach we could take is to use a default value of 'primary cta' for all buttons, and then pass in exceptions for a list of known pages / placements. Does that sound like a feasible approach?
Can we talk about a solution tomorrow towards the start of the day EST?
After talking this through with Peter today we've aligned on the following approach: - Add an optional attribute to the download button helper that can pass in a value. - Values for the attribute will be either 'nav', 'sub nav', 'primary cta' or 'other'. - There will be no default value for this attribute, it will only be included on a button if defined explicitly in the template. - Add attributes to buttons on all new style hub pages. We're not as concerned with tracking legacy pages.
Peter, I pushed a patch for this to demo. Can you please test on all new hub style pages? https://www-demo3.allizom.org/en-US/firefox/
Hi Alex, Is it possible to do this on /new/ as well even though it uses the old style? Thanks, PG
Can we also put this on the google play / iTunes buttons?
Answer should be yes to both questions - will update tomorrow, thanks.
(In reply to Alex Gibson [:agibson] from comment #8) > Answer should be yes to both questions - will update tomorrow, thanks. Peter, demo should now be updated for both /new/ and mobile buttons. Can you test again? Thanks https://www-demo3.allizom.org/en-US/firefox/new/ https://www-demo3.allizom.org/en-US/firefox/android/ https://www-demo3.allizom.org/en-US/firefox/ios/
Looks good. Not sure if this is scope creep, but I didn't see it on scene 2. Should I make a new bug for that?
(In reply to pgerman from comment #10) > Looks good. > > Not sure if this is scope creep, but I didn't see it on scene 2. Should I > make a new bug for that? Why do you need it on scene2 out of curiosity? There's only one button on there and it's visually hidden
There are the mobile download buttons, no?
(In reply to pgerman from comment #12) > There are the mobile download buttons, no? Oh crap, yes you are right. These should have a value of 'other'?
(In reply to pgerman from comment #14) > yeah. Thanks. Updated mobile buttons on scene2, also added attributes to the buttons on the new /firefox/focus/ page https://www-demo3.allizom.org/en-US/firefox/new/?scene=2 https://www-demo3.allizom.org/en-US/firefox/focus/
Thanks. Publish when ready.
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/3625a597f0c7fb65238b7b4d28c49f7a5f06e5b8 [fix bug 1359982] Add location tag to download button https://github.com/mozilla/bedrock/commit/218d83f1f235b84dee21e29cfa70a93d2f5c2b72 Merge pull request #4903 from alexgibson/bug-1359982-download-button-location-tag [fix bug 1359982] Add location tag to download button