Skip to content
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
6 changes: 4 additions & 2 deletions assets/js/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,10 @@
"Visitoractivity": "Visitor activity",
"moreDetailedAnalysis" : "If you would like a more detailed analysis for this web page, reach out to your <a target='_blank' href='https://gcxgce.sharepoint.com/:u:/r/teams/10001402/SitePages/Institutional-Representatives-for-Analytics.aspx?csf=1&web=1&share=EZpDqd39FXJKqx0tPiTMIvIBANt2vLbqOJwH8kdXQQbuYw&e=vvgnai'>institutional representatives for analytics</a> (accessible only with a GCXchange account).",
"Close": "Close",
"alert-am-removed-title": "\"What visitors clicked on\" data not available",
"alert-am-removed-text": "Visitor click data is currently only available for pages on www.canada.ca as of September 19, 2024. We are working on making this feature available for other GC websites.",
"alert-am-removed-titlePREVIOUS": "\"What visitors clicked on\" data not available",
"alert-am-removed-textPREVIOUS": "Visitor click data is currently only available for pages on www.canada.ca as of September 19, 2024. We are working on making this feature available for other GC websites.",
"alert-am-removed-title": "\"What visitors clicked on\" data temporarily removed",
"alert-am-removed-text": "We have temporarily removed this data as it is not always an accurate depiction of clicks. We are working on an alternative solution and will update the Page Analytics Tool as soon as a solution is found.",

"quote0": "What did the janitor say when he jumped out of the closet? Supplies!",
"quote1": "Why did Hans Solo not enjoy his steak dinner? It was Chewie!",
Expand Down
6 changes: 4 additions & 2 deletions assets/js/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@
"Didyouknow": "Le savais-tu?",
"moreDetailedAnalysis": "Si vous désirez une analyse plus détaillée de cette page Web, veuillez contacter vos <a target='_blank' href='https://gcxgce.sharepoint.com/:u:/r/teams/10001402/SitePages/Repr%C3%A9sentants-institutionnels-en-analytique-Web.aspx?csf=1&web=1&share=ETzl_RumJUJOujOKrxaaKMwBl10Taoc-YVrHSlsb4kJsGA&e=EgiMb7'>représentants institutionnels en analytique Web</a> (accessible uniquement avec un compte GCÉchange).",
"Close": "Fermer",
"alert-am-removed-title": "Données non disponibles « Clics des visiteurs »",
"alert-am-removed-text": "Les données sur les clics des visiteurs ne sont actuellement disponibles que pour les pages de www.canada.ca à partir du 19 septembre 2024. Nous travaillons à rendre cette fonction disponible pour d’autres sites Web du GC."
"alert-am-removed-titlePREVIOUS": "Données non disponibles « Clics des visiteurs »",
"alert-am-removed-textPREVIOUS": "Les données sur les clics des visiteurs ne sont actuellement disponibles que pour les pages de www.canada.ca à partir du 19 septembre 2024. Nous travaillons à rendre cette fonction disponible pour d’autres sites Web du GC.",
"alert-am-removed-title": "Retrait temporaire des données « Clics des visiteurs »",
"alert-am-removed-text": "Nous avons temporairement retiré ces données, car elles ne fournissent pas toujours une représentation exacte des clics. Nous travaillons sur une solution alternative et nous mettrons à jour l'outil d'analyse de page dès qu'une solution sera trouvée."
}
15 changes: 13 additions & 2 deletions assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,24 @@ button.black:hover {

/* a[href^="#visitor-activity"] + ul,
a[href^="#activité-de-visiteur"] + ul, */
/* #np
#np
{
display:none;
} */
}

.button-nostyle {
background: none;
border: none;
padding: 0;
}

/* Prevent the original section created by the script doesn’t briefly flash before hiding */
section.pagedetails {
display: none !important;
}
section.pagedetails.pat-version {
display: block !important;
}
section.pagedetails:not(.pat-version) {
display: none !important;
}
12 changes: 11 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,17 @@ <h2 class="modal-title" data-i18n="hlp-three-end-title"></h2>
<button class="btn btn-sm btn-primary pull-left popup-modal-dismiss" type="button" data-i18n="Close"><span class="wb-inv"></span></button>
</div>
</section>

<section class="pagedetails pat-version">
<h2 class="wb-inv">Page analytics tool version</h2>
<div class="row">
<div class="col-xs-12">
<dl id="wb-dtmd">
<dt>Version:</dt>
<dd>2.0.0</dd>
</dl>
</div>
</div>
</section>

<div id="def-preFooter">
<!-- Write closure fall-back static file -->
Expand Down
24 changes: 13 additions & 11 deletions js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,8 @@ function sortByCol(arr) {
return arr.sort((a, b) => b.Clicks - a.Clicks);
}

const jsonAM = (json, day, url) => {
//const jsonAM = (json, day, url) => {
const jsonAM = (json, day) => {
var rows = json["rows"][0];
var val = "#np";
var $next = $("#np");
Expand Down Expand Up @@ -1505,15 +1506,15 @@ const jsonAM = (json, day, url) => {
} else {
$next.html($.i18n("Nodata"));
}
// If page is NON canada.ca: Hide the '#np' table and Show the 'What visitors clicked on data temporarily removed' alert text;
if (url.indexOf("canada.ca") !== -1) { //canada.ca page
$next.show();
$("#np-container .alert").hide();
}
else { // NON canada.ca page
$next.hide();
$("#np-container .alert").show();
}
// // If page is NON canada.ca: Hide the '#np' table and Show the 'What visitors clicked on data temporarily removed' alert text;
// if (url.indexOf("canada.ca") !== -1) { //canada.ca page
// $next.show();
// $("#np-container .alert").hide();
// }
// else { // NON canada.ca page
// $next.hide();
// $("#np-container .alert").show();
// }

};

Expand Down Expand Up @@ -2516,7 +2517,8 @@ const apiCall = (d, i, a, uu, dd, fld, lg, r, e) =>
case "srchAll":
return jsonSearchesAll(res, dd);
case "activityMap":
return jsonAM(res, dd, uu);
//return jsonAM(res, dd, uu);
return jsonAM(res, dd);
case "metrics-new":
return jsonMetrics(res, dd);
//case "refType": return jsonRT(res, dd);
Expand Down
Loading
Loading