Skip to content

Commit

Permalink
Add section parameter to browse link tracking
Browse files Browse the repository at this point in the history
- adds a 'section' parameter to the GA4 tracking for action links to match the heading of the section they are in
  • Loading branch information
andysellick committed Sep 3, 2024
1 parent af0b433 commit 1c73f43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/helpers/browse_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def popular_links_for_slug(slug)
index_link: index,
index_total: count,
text: link[:title],
section: "popular tasks",
},
},
}
Expand Down
3 changes: 3 additions & 0 deletions spec/helpers/browse_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def popular_tasks_variant_b_page?
index_link: 1,
index_total: 3,
text: "HMRC online services: sign in or set up an account",
section: "popular tasks",
},
},
},
Expand All @@ -51,6 +52,7 @@ def popular_tasks_variant_b_page?
index_link: 2,
index_total: 3,
text: "Self Assessment tax returns",
section: "popular tasks",
},
},
},
Expand All @@ -66,6 +68,7 @@ def popular_tasks_variant_b_page?
index_link: 3,
index_total: 3,
text: "Pay employers' PAYE",
section: "popular tasks",
},
},
},
Expand Down

0 comments on commit 1c73f43

Please sign in to comment.