Skip to content

Commit

Permalink
add ga events
Browse files Browse the repository at this point in the history
  • Loading branch information
kewitham committed Dec 29, 2023
1 parent b6fc639 commit 163188b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions _includes/download.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% assign lang = page.lang %}
{% if lang==nil %}{% assign lang="en" %}{% endif %}
<div class="download-cta">
<a href="/assets/pdfs/{{include.filename}}" download class="crt-page--downloadpdf-link">
<a href="/assets/pdfs/{{include.filename}}" data-ga-event-name="view {{include.filename}}" class="crt-page--downloadpdf-link view-link">
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
<use xlink:href="{{ '/assets/images/uswds/sprite.svg' | relative_url }}#file_present"></use>
</svg>
View {{ include.text }}
</a>
<a href="/assets/pdfs/{{include.filename}}" download class="crt-page--downloadpdf-link">
<a href="/assets/pdfs/{{include.filename}}" download data-ga-event-name="download {{include.filename}}" class="crt-page--downloadpdf-link download-link">
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
<use xlink:href="{{ '/assets/images/uswds/sprite.svg' | relative_url }}#file_download"></use>
</svg>
Expand Down
8 changes: 4 additions & 4 deletions _includes/landing/law-reg-tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<div class="h4 crt-landing--icon_grey"><img src="{{'/assets/images/landing/laws_regs_standards_grey_bg.png' | relative_url}}" alt=""/></div>
<div>
<h3>
<a href="{{'/law-and-regs/regulations/' | relative_url}}">Regulations</a>
<a href="{{'/law-and-regs/regulations/' | relative_url}}" class="law-reg-tile-link" data-ga-event-name="Learn more regulations">Regulations</a>
</h3>
<div style="margin-top: 0px" class="no-bullets padding-left-2">
<p>DOJ is responsible for issuing regulations under the Americans with Disabilities Act (ADA) that explain the rights of people with disabilities and the obligations of those covered by the laws.</p>
</div>
<a href="{{'/law-and-regs/regulations/' | relative_url}}" class="usa-button">Learn more</a>
<a href="{{'/law-and-regs/regulations/' | relative_url}}" class="usa-button law-reg-tile-link" data-ga-event-name="Learn more regulations">Learn more</a>
</div>
</div>
</div>
Expand All @@ -18,12 +18,12 @@ <h3>
<div class="h4 crt-landing--icon_grey"><img src="{{'/assets/images/construction.png' | relative_url}}" alt=""/></div>
<div>
<h3>
<a href="{{'/law-and-regs/design-standards' | relative_url }}">Design Standards</a>
<a href="{{'/law-and-regs/design-standards' | relative_url }}" class="law-reg-tile-link" data-ga-event-name="Learn more design standards">Design Standards</a>
</h3>
<div style="margin-top: 0px" class="no-bullets padding-left-2">
<p>The ADA Standards for Accessible Design say what is required for a building or facility to be physically accessible to people with disabilities.</p>
</div>
<a href="{{'/law-and-regs/design-standards/' | relative_url}}" class="usa-button">Learn more</a>
<a href="{{'/law-and-regs/design-standards/' | relative_url}}" class="usa-button law-reg-tile-link" data-ga-event-name="Learn more design standards">Learn more</a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _includes/resource.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="h4 crt-landing--icon_grey"><img src="{{include.icon | relative_url}}" alt="resource cta icon"/></div>
<div>
<h3>
<a href="{{include.link | relative_url}}">{{include.title}}</a>
<a href="{{include.link | relative_url}}" class="law-reg-resource-link" data-ga-event-name="{{include.title}}">{{include.title}}</a>
</h3>
<div style="margin-top: 0px" class="no-bullets padding-left-2">
<p>{% if include.subtitle != nil %}<strong>{{include.subtitle}}</strong>{% endif %}{{include.text}}</p>
Expand Down
1 change: 0 additions & 1 deletion _pages/law-and-regs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ title: Laws, Regulations & Standards
description: Regulations developed by the Department of Justice that explain the rights of people with disabilities and the obligations of those covered by the law.
subpagenav: true
sidenav: false
page-helpful: false
hide_page_type_info: true
redirect_from:
- /2010_regs.htm
Expand Down
6 changes: 5 additions & 1 deletion assets/js/utils/gaUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ function gtag() {
['.section-btn', 'click', sendGAClickEvent],
['.carousel-btn', 'click', sendGAClickEvent],
['.carousel-nav', 'click', sendGAClickEvent],
['.enforcement-link','click', sendGAClickEvent],
['.enforcement-link', 'click', sendGAClickEvent],
['.download-link', 'click', sendGAClickEvent],
['.view-link', 'click', sendGAClickEvent],
['.law-reg-tile-link', 'click', sendGAClickEvent],
['.law-reg-resource-link', 'click', sendGAClickEvent],
]

export default function initGAEvents() {
Expand Down

0 comments on commit 163188b

Please sign in to comment.