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 tracking module to next/prev component #1359

Merged
merged 1 commit into from
Mar 29, 2018
Merged
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 @@ -4,10 +4,18 @@
role="navigation"
aria-label="<%= t("govuk_component.previous_and_next_navigation.pagination", default: "Pagination") %>"
>
<ul class="pub-c-pagination__list">
<ul class="pub-c-pagination__list" data-module="track-click">
<% if local_assigns.include?(:previous_page) %>
<li class="pub-c-pagination__item pub-c-pagination__item--previous">
<a href="<%= previous_page[:url] %>" class="pub-c-pagination__link" rel="prev">
<a href="<%= previous_page[:url] %>"
class="pub-c-pagination__link"
rel="prev"
data-track-category="contentsClicked"
data-track-action="previous"
data-track-label="<%= previous_page[:url] %>"
data-track-dimension="previous"
data-track-dimension-index="29"
>
<span class="pub-c-pagination__link-title">
<svg class="pub-c-pagination__link-icon" xmlns="http://www.w3.org/2000/svg" height="13" width="17" viewBox="0 0 17 13">
<path fill="currentColor" d="m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z"/>
Expand All @@ -23,7 +31,15 @@
<% end %>
<% if local_assigns.include?(:next_page) %>
<li class="pub-c-pagination__item pub-c-pagination__item--next">
<a href="<%= next_page[:url] %>" class="pub-c-pagination__link" rel="next">
<a href="<%= next_page[:url] %>"
class="pub-c-pagination__link"
rel="next"
data-track-category="contentsClicked"
data-track-action="next"
data-track-label="<%= next_page[:url] %>"
data-track-dimension="next"
data-track-dimension-index="29"
>
<span class="pub-c-pagination__link-title">
<%= next_page[:title] %>
<svg class="pub-c-pagination__link-icon" xmlns="http://www.w3.org/2000/svg" height="13" width="17" viewBox="0 0 17 13">
Expand Down