Skip to content

Commit 08ceedf

Browse files
authored
Merge pull request #530 from canada-ca/feature/adode-analytics
Add Adobe tracking configuration and metadata updates
2 parents 8d68ccc + da7e080 commit 08ceedf

16 files changed

+154
-53
lines changed

.gitignore

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,3 @@ _site
4040
Gemfile
4141
Gemfile*
4242
vendor
43-
44-
# BMAD Core Bundle
45-
.bmad-*/
46-
47-
# Gemini Code Assist Configuration
48-
.gemini/
49-
GEMINI.md
50-
51-
# Copilot Configuration
52-
.github/chatmodes
53-
.github/instructions
54-
.github/copilot-instructions.md
55-
56-
# VS Code Configuration
57-
.vscode/
58-
59-
# Documentation and Draft Files
60-
docs/
61-
.docs/
62-
memory/
63-
memory-bank/

403.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
altLangPage: 403.html
3+
date: 2025-08-14
4+
dateModified: 2025-08-14
5+
description: "Page not found"
6+
error-code: 403
7+
permalink: /403.html
8+
title: "Access forbidden"
9+
---
10+
11+
<p class="label label-danger">403 error</p>
12+
<p>You don't have permission to access this page. This could be because:</p>
13+
<ul>
14+
<li>The page is restricted to authorized users only</li>
15+
<li>Your session may have expired</li>
16+
<li>You may need to sign in with proper credentials</li>
17+
<li>The content requires specific access permissions</li>
18+
</ul>
19+
<p>You may be looking for:</p>
20+
<ul>
21+
<li><a href="https://design.canada.ca/">Design for the Government of Canada services</a></li>
22+
<li><a href="https://www.canada.ca/en/">Canada.ca home page</a></li>
23+
<li><a href="https://www.canada.ca/en/">Contact the Government of Canada</a></li>
24+
<li><a href="https://www.canada.ca/en/">Sign in to an account</a></li>
25+
<li><a href="https://www.canada.ca/en/">Benefits</a></li>
26+
<li><a href="https://www.canada.ca/en/">Taxes</a></li>
27+
<li><a href="https://www.canada.ca/en/">Visit or immigrate to Canada</a></li>
28+
</ul>

404.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
altLangPage: 404.html
3+
date: 2025-08-14
4+
dateModified: 2025-08-14
5+
description: "Page not found"
6+
error-code: 404
7+
permalink: /404.html
8+
title: "We couldn't find that web page (Error 404)"
9+
---
10+
<p class="label label-danger">404 error</p>
11+
<p>The page you're looking for may have been moved or deleted. Check that the address (URL) is correct. Do not include special characters.</p>
12+
<p>You may be looking for:</p>
13+
<ul>
14+
<li><a href="https://design.canada.ca/">Design for the Government of Canada services</a></li>
15+
<li><a href="https://www.canada.ca/en">Canada.ca home page</a></li>
16+
<li><a href="https://www.canada.ca/en">Contact the Government of Canada</a></li>
17+
<li><a href="https://www.canada.ca/en">Sign in to an account</a></li>
18+
<li><a href="https://www.canada.ca/en">Benefits</a></li>
19+
<li><a href="https://www.canada.ca/en">Taxes</a></li>
20+
<li><a href="https://www.canada.ca/en">Visit or immigrate to Canada</a></li>
21+
</ul>

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
source "https://rubygems.org"
2-
# gem "jekyll", "~> 4.2"
32
gem "jekyll-remote-theme", github: "benbalter/jekyll-remote-theme", branch: "master"
43

54
# Some stdlib libraries (logger, csv) are required by Jekyll and newer Ruby

Gemfile.lock

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ GEM
2525
eventmachine (1.2.7)
2626
ffi (1.15.5)
2727
forwardable-extended (2.6.0)
28-
google-protobuf (3.25.5-arm64-darwin)
29-
google-protobuf (3.25.5-x86_64-darwin)
30-
google-protobuf (3.25.5-x86_64-linux)
28+
google-protobuf (3.25.5)
3129
http_parser.rb (0.8.0)
3230
i18n (1.12.0)
3331
concurrent-ruby (~> 1.0)
@@ -85,6 +83,7 @@ GEM
8583

8684
PLATFORMS
8785
arm64-darwin-22
86+
arm64-darwin-24
8887
x86_64-darwin-22
8988
x86_64-linux
9089

_config.staging.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
analytics:
2-
providers:
3-
# adobe:
4-
# tracking_id: be5dfd287373/0127575cd23a/launch-913b1beddf7a-staging
5-
# service: TBS-DTO-TEST_TEST-BTN-SCT
2+
provider:
3+
adobe:
4+
tracking_id: "be5dfd287373/0127575cd23a/launch-913b1beddf7a-staging"
5+
service: "ESDC_TEST-TEST_EDSC"
66
url: "DEPLOY_PRIME_URL"

_config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
"fr": "https://conception.canada.ca"
55
},
66
"analytics": {
7-
"providers": {
7+
"provider": {
88
"google": {
99
"tracking_id": "GTM-KMVB8C2"
10+
},
11+
"adobe": {
12+
"tracking_id": "be5dfd287373/0127575cd23a/launch-f7c3e6060667",
13+
"service": "ESDC-EDSC",
14+
"gcaaterms": "ESDC-EDSC_CanadacaDesign-ConceptionCanadaca"
1015
}
1116
}
1217
},

_includes/analytics.html

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1-
{%- if site.analytics.providers.google %}
2-
{%- include providers/google.html %}
1+
{% comment %}
2+
This file loads analytics provider scripts.
3+
Multiple providers can be loaded simultaneously if configured.
4+
The configuration structure in _config.yml is:
5+
analytics:
6+
providers:
7+
adobe: {...}
8+
google: {...}
9+
etc.
10+
{% endcomment %}
11+
12+
<!-- Provider configuration - each is evaluated independently -->
13+
{%- if site.analytics.provider.adobe %}
14+
{% include /providers/adobehead.html %}
315
{%- endif -%}
4-
{%- if site.analytics.providers.google_universal %}
5-
{%- include providers/google-universal.html %}
16+
{%- if site.analytics.provider.google %}
17+
{% include /providers/google.html %}
618
{%- endif -%}
7-
{%- if site.analytics.providers.google_gtag %}
8-
{%- include providers/google-gtag.html %}
19+
{%- if site.analytics.provider.google-universal %}
20+
{% include /providers/google-universal.html %}
921
{%- endif -%}
10-
{%- if site.analytics.providers.adobe %}
11-
{%- include providers/adobehead.html %}
22+
{%- if site.analytics.provider.google-gtag %}
23+
{% include /providers/google-gtag.html %}
1224
{%- endif -%}
13-
{%- if site.analytics.providers.custom %}
14-
{%- include providers/custom.html %}
25+
{%- if site.analytics.provider.custom %}
26+
{% include /providers/custom.html %}
1527
{%- endif -%}

_includes/metadata.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
{%- if page.subject %}
2828
<meta name="dcterms.subject" title="gccore" content="{{ page.subject }}"/>
2929
{%- endif %}
30+
<meta name="dcterms.accessRights" content="2" />
31+
<meta name="gcaaterms.sitename" content="{{ site.analytics.provider.adobe.gcaaterms }}" />
3032
{%- if page.keywords %}
3133
<meta name="keywords" title="gccore" content="{{ page.keywords }}"/>
3234
{%- endif %}

_includes/providers/adobefooter.html

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
<script type="text/javascript">
2-
window.onload = function() {
3-
_satellite.pageBottom();
4-
};
5-
</script>
2+
window.onload = function() {
3+
_satellite.pageBottom();
4+
5+
// Anchor link tracking - follows Adobe Analytics Implementation Manual guidelines
6+
document.addEventListener('click', function(e) {
7+
if (e.target.tagName === 'A' && e.target.getAttribute('href') &&
8+
e.target.getAttribute('href').startsWith('#')) {
9+
10+
// Extract anchor name from href (remove #)
11+
var anchorName = e.target.getAttribute('href').substring(1);
12+
13+
// Push customTracking event to Adobe Data Layer
14+
// Format: Dept. Abbreviation:Custom Variable Name:Custom Value
15+
adobeDataLayer.push({
16+
"event": "customTracking",
17+
"link": {
18+
"customCall": "TBS-SCT:Anchor Link Click:" + anchorName
19+
}
20+
});
21+
}
22+
});
23+
};
24+
</script>

0 commit comments

Comments
 (0)