Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data-cta-name to documentation #15392

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<h1 class="wnp-main-title">{{ main_title }}</h1>
<p class="wnp-main-body">{{ main_body_part_one }}</p>
<p class="wnp-main-body">{{ main_body_part_two }}</p>
<button class="mzp-c-button mzp-t-dark js-new-tab" type="button" data-cta-text="{{ cta }}">{{ cta }}</a>
<button class="mzp-c-button mzp-t-dark js-new-tab" type="button" data-cta-text="Try it now" data-cta-name="wnp-fx132-eu-{{LANG}}-try-wallpapers">{{ cta }}</a>
{% endcall %}
</section>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1 class="wnp-main-title">Celebrating 20 years</h1>
<div class="wnp-action-container">
<h2>Brighten your browser experience</h2>
<p>Check out our special edition wallpapers — open a new tab and click the gear icon at the top right corner.</p>
<button class="c-cta-button js-new-tab" data-cta-text="Try it now">Try it now</button>
<button class="c-cta-button js-new-tab" data-cta-text="Try it now" data-cta-name="wnp-fx132-na-{{LANG}}-try-wallpapers">Try it now</button>
<img class="wnp-sticker-heart" src="{{ static('img/firefox/whatsnew/whatsnew132/sticker-heart.svg') }}" width="92" height="85" alt="">
<img class="wnp-sticker-fox" src="{{ static('img/firefox/whatsnew/whatsnew132/sticker-fox.svg') }}" width="119" height="96" alt="">
<img class="wnp-sticker-happy" src="{{ static('img/firefox/whatsnew/whatsnew132/sticker-happy.svg') }}" width="86" height="86" alt="">
Expand All @@ -40,7 +40,7 @@ <h2>Brighten your browser experience</h2>
<div class="wnp-action-container">
<h2>We’d love to hear your ideas</h2>
<p>By joining the Mozilla Connect community, you can help build your next favorite Firefox feature.</p>
<a class="mzp-c-cta-link" href="https://connect.mozilla.org/?{{ utm_params }}" data-cta-text="Join now">
<a class="mzp-c-cta-link" href="https://connect.mozilla.org/?{{ utm_params }}" data-cta-text="Join now" data-cta-name="wnp-fx132-na-{{LANG}}-join-community">
Join now
</a>
<img class="wnp-sticker-chat" src="{{ static('img/firefox/whatsnew/whatsnew132/sticker-chat.svg') }}" width="110" height="105" alt="">
Expand Down
5 changes: 4 additions & 1 deletion docs/attribution/0001-analytics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ The attribute ``data-cta-text`` must be present to trigger the event. All links
| | - This is to group CTAs by their destination |
| | - Do not use this to identify the element (ie. link, button) |
+-----------------------+----------------------------------------------------------------------------------+

| ``data-cta-name`` | A identifier for this cta that is unique across the entire site. (e.g. |
| | ``fx20-primarycta``, ``wnp118-sfaq-so-special-features``). This is to help with |
| | reporting since it is difficult to filter on more than one parameter at a time. |
+-----------------------+----------------------------------------------------------------------------------+


.. code-block:: html
Expand Down