Skip to content
This repository was archived by the owner on Jul 5, 2021. It is now read-only.

Commit

Permalink
use data-title to prevent translated event strings
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaring committed Sep 9, 2019
1 parent 4af6411 commit 3c91fc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion js/lib/get-started.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function () {
}
function trackOptionClick (el) {
if (!window.ga) return
var title = $(el).closest('.option-block').find('h4').text().toLowerCase()
var title = ((el.dataset && el.dataset.title) || $(el).closest('.option-block').find('h4').text()).toLowerCase()
window.ga('send', 'event', {
eventCategory: el.checked ? 'open option' : 'close option',
eventAction: 'click',
Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/get-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h5>Get started now, with these helpful resources.</h5>
<div class="options">
<div class="option-blocks">
<div class="option-block">
<input type="checkbox" id="ocb1" name="ocb" />
<input type="checkbox" id="ocb1" name="ocb" data-title="Publish and share your files" />
<label class="option-label" for="ocb1">
<div>
<h4>Publish and share your files</h4>
Expand Down Expand Up @@ -49,7 +49,7 @@ <h5>Publish files on the Internet without worrying if they will be tampered with
</div>
</div>
<div class="option-block">
<input type="checkbox" id="ocb2" name="ocb" />
<input type="checkbox" id="ocb2" name="ocb" data-title="Manage large amounts of data" />
<label class="option-label" for="ocb2">
<div>
<h4>Manage large amounts of data</h4>
Expand Down Expand Up @@ -90,7 +90,7 @@ <h5>Store and work with large data sets without relying on a single centralized
</div>
</div>
<div class="option-block">
<input type="checkbox" id="ocb3" name="ocb" />
<input type="checkbox" id="ocb3" name="ocb" data-title="Build an app or service" />
<label class="option-label" for="ocb3">
<div>
<h4>Build an app or service</h4>
Expand Down Expand Up @@ -129,7 +129,7 @@ <h5>Use IPFS in your application or service to build amazing things on the decen
</div>
</div>
<div class="option-block">
<input type="checkbox" id="ocb4" name="ocb" />
<input type="checkbox" id="ocb4" name="ocb" data-title="Something else" />
<label class="option-label" for="ocb4">
<div>
<h4>Something else</h4>
Expand Down

0 comments on commit 3c91fc3

Please sign in to comment.