Skip to content

Commit

Permalink
Updated the analytics and move the cookie banner top
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnanesh V committed Sep 10, 2024
1 parent d418a74 commit cb92cb7
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
docker build -t ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} -f Dockerfile-api .
echo "Pushing image to ECR..."
docker push ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
echo "name=image::${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}" >> $GITHUB_OUTPUT
echo "::set-output name=image::${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}" >> $GITHUB_OUTPUT
- name: Build, tag, and push the Web to ECR
if: ${{ github.event.inputs.create_kbs_web == 'true' }}
id: build-push-Web
Expand All @@ -72,4 +72,4 @@ jobs:
docker build -t ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} -f Dockerfile-web .
echo "Pushing image to ECR..."
docker push ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
echo "name=image::${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}" >> $GITHUB_OUTPUT
echo "::set-output name=image::${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change
Expand Up @@ -190,27 +190,27 @@
<nav class="tna-footer__legal tna-column tna-column--full" aria-label="Legal">
<ul class="tna-footer__legal-items tna-ul tna-ul--plain">
<li class="tna-footer__legal-item">
<a href="#/accessibility" class="tna-footer__legal-item-link">
<a href="https://www.nationalarchives.gov.uk/help/web-accessibility/" class="tna-footer__legal-item-link">
Accessibility statement
</a>
</li>
<li class="tna-footer__legal-item">
<a href="#/freedom-of-information" class="tna-footer__legal-item-link">
<a href="https://www.nationalarchives.gov.uk/about/freedom-of-information/" class="tna-footer__legal-item-link">
Freedom of information
</a>
</li>
<li class="tna-footer__legal-item">
<a href="#/terms-and-conditions" class="tna-footer__legal-item-link">
<a href="https://www.nationalarchives.gov.uk/legal/" class="tna-footer__legal-item-link">
Terms and conditions
</a>
</li>
<li class="tna-footer__legal-item">
<a href="#/privacy" class="tna-footer__legal-item-link">
<a href="https://www.nationalarchives.gov.uk/legal/privacy-policy/" class="tna-footer__legal-item-link">
Privacy policy
</a>
</li>
<li class="tna-footer__legal-item">
<a href="#/cookies" class="tna-footer__legal-item-link">
<a href="https://www.nationalarchives.gov.uk/legal/cookies/" class="tna-footer__legal-item-link">
Cookies
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<a href="#main-content" class="tna-skip-link" data-module="tna-skip-link">
Skip to main content
</a>
@await Html.PartialAsync("Partials/_CookieConsent")
<header class="tna-global-header" data-module="tna-global-header">
<div class="tna-container tna-global-header__main">
<div class="tna-column tna-column--flex-1 tna-column--order-2">
Expand Down
12 changes: 8 additions & 4 deletions book-a-reading-room-visit.web/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
</noscript>
<!-- End Google Tag Manager (noscript) -->
}
@await Html.PartialAsync("Partials/_CookieConsent")
@await Html.PartialAsync("Partials/_NotificationBanner")
@await Html.PartialAsync("Partials/_Header")

Expand All @@ -85,10 +84,15 @@
<script src="~/js/dist/print-your-order.js"></script>
<script src="~/js/book-a-reading-room-visit-0.0.1.js"></script>
<script src="~/js/all.js"></script>
<script src="~/js/analytics.js"></script>
<script src="~/js/tna-frontend-analytics-0.2.10-prerelease.js"></script>
<script>
if (window.TNAFrontend && window.TNAFrontend.initAll) {
window.TNAFrontend.initAll()
if (window.TNAFrontend) {
if (window.TNAFrontend.Cookies) {
new window.TNAFrontend.Cookies({ domain: ".nationalarchives.gov.uk" });
}
if (window.TNAFrontend.initAll) {
window.TNAFrontend.initAll()
}
}
if (window.TNAFrontendAnalytics && window.TNAFrontendAnalytics.GA4) {
new TNAFrontendAnalytics.GA4({ addTrackingCode: false })
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions book-a-reading-room-visit.web/wwwroot/js/analytics.js

This file was deleted.

1 change: 0 additions & 1 deletion book-a-reading-room-visit.web/wwwroot/js/analytics.js.map

This file was deleted.

Large diffs are not rendered by default.

0 comments on commit cb92cb7

Please sign in to comment.