Skip to content

Add tracking for buttons

Warren Gifford requested to merge kjuell/buttons-tracking into main

Created by: katjuell

Closes #5108 (closed) by adding tracking for buttons on the site. For more info about the data attributes, check out the discussion (with screenshots) in this doc.

Note that this does not add tracking on GA. This will still need to happen.

Tl;dr on the schema in use for this PR: data-button-style: 1 — Bootstrap primary button 2 — Bootstrap outline button 3 — ArrowRightIcon with text 4 — ArrowRightBoxIcon with text 5 — Bootstrap outline button with ArrowRightBoxIcon on the inside

data-button-location: 1 — Nav 2 — Hero 3 — Body (for body CTAs, we are only tracking calls to demo Sourcegraph. See the discussion doc for more details). 4 — ”Try Sourcegraph” sections. The sections that offer different callouts to try Sourcegraph, above the footer.

Pages that do not have tracking (but please let me know if they should!):

  • /jobs
  • /resources/abcs-ebook
  • /white-papers/remote-work-easier

To Test

  • Navigate to some of the pages updated in the PR and check that the data attributes have been added.

Merge request reports

Loading