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

Extends Matomo Analytics #678

Merged
merged 9 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions _includes/matomo.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackVisibleContentImpressions']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
Expand Down
2 changes: 1 addition & 1 deletion about/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To contribute to this website, please create a fork of [llnl.github.io](https://
* Be explicit when opening issues and reporting bugs. What behavior are you expecting? What is your justification or use case for the new feature/enhancement? How can the bug be recreated? What are any environment variables to consider (e.g., browser, OS)?

<!-- START: Accordions Each h2 below will be a separate accordion. -->
<div class="accordion default border-top-gradient-software-blue-green border-bottom-gradient-software-blue-green">
<div class="border-top-gradient-software-blue-green border-bottom-gradient-software-blue-green">

{% capture accordionContent %}
Before you begin, make sure you have working installs of Git, Ruby, and [Bundler](https://bundler.io). After you fork the repo, make sure you are in the directory you just created by running `cd llnl.github.io` Then you can use `bundler` to install the Ruby dependencies (see the [Jekyll installation docs](https://jekyllrb.com/docs/installation/) for step-by-step guides to setting this up):
Expand Down
2 changes: 1 addition & 1 deletion about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ LLNL is a Department of Energy ([DOE](https://www.energy.gov/national-laboratori
</div>
<div class="col-12 col-lg-6 mb-3">
<div class="responsive-iframe-container">
<iframe class="responsive-iframe" width="50%" src="https://www.youtube.com/embed/nTxMn1NWHQU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe class="responsive-iframe" width="50%" src="https://www.youtube.com/embed/nTxMn1NWHQU?enablejsapi=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
</div>
Expand Down
8 changes: 8 additions & 0 deletions assets/js/news/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,25 @@ angular.module("app", ['tid-custom']).controller("PostController", function($sco

$scope.setCategory = function(category) {
$scope.activeCategory = category;
if (typeof _paq !== 'undefined') {
_paq.push(['trackEvent', 'News', 'Category Filter', category]);
}
}

$scope.clearYear = function() {
$scope.activeYear = null;
}

$scope.setYear = function(year) {
var actionName = year;
if (year === $scope.activeYear) {
$scope.clearYear();
actionName = 'All';
} else {
$scope.activeYear = year;
}
if (typeof _paq !== 'undefined') {
_paq.push(['trackEvent', 'News', 'Year Filter', actionName]);
}
}
});
7 changes: 6 additions & 1 deletion assets/js/news/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ angular.module("app", ['ngAnimate']).controller("ReleaseController", function($s
}

$scope.setYear = function(year) {
var actionName = year;
if (year === $scope.activeYear) {
$scope.clearYear();
actionName = 'All';
} else {
$scope.activeYear = year;
}
}
if (typeof _paq !== 'undefined') {
_paq.push(['trackEvent', 'Release', 'Year Filter', actionName]);
}
}

$scope.sortByPublishedAt = function(a, b) {
Expand Down
Loading