Skip to content

Commit

Permalink
Merge pull request #593 from GSA/mitchellhenke/update-ga
Browse files Browse the repository at this point in the history
Update Google Analytics script
  • Loading branch information
mitchellhenke authored Jan 18, 2024
2 parents b604ceb + f69d9e5 commit 91ec2a9
Show file tree
Hide file tree
Showing 12 changed files with 16,840 additions and 13,783 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:10.15.1-browsers
- image: cimg/node:20.10-browsers
environment:
CHROME_PATH: /usr/bin/google-chrome
NODE_OPTIONS: --openssl-legacy-provider

steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/fermium
lts/iron
20 changes: 8 additions & 12 deletions config/webpack/webpack.shared.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path')
const { dirname, join, resolve } = require('path')
const AppManifestWebpackPlugin = require('app-manifest-webpack-plugin')
const FaviconsWebpackPlugin = require('favicons-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyPlugin = require('copy-webpack-plugin')
Expand Down Expand Up @@ -135,20 +135,16 @@ module.exports = {
removeScriptTypeAttributes: true
}
}),
new AppManifestWebpackPlugin({
emitStats: true,
new FaviconsWebpackPlugin({
logo: './assets/img/favicon.png',
icons: {
appleStartup: false
},
inject: true,
prefix: join(PUBLIC_PATH, '/assets/img/favicons'),
output: './assets/img/favicons/',
config: {
favicons: true,
firefox: true,
windows: true,
yandex: false
favicons: {
developerURL: null, // prevent retrieving from the nearest package.json
icons: {
coast: false,
yandex: false
}
}
})
// new CleanWebpackPlugin()
Expand Down
8 changes: 3 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
</script>

<!-- We use Google Tag Manager to participate in the Federal Government's Digital Analytics Program (DAP). You can see the data for code.gov and other federal websites at analytics.usa.gov -->
<script>
<% if (ENABLE_GOOGLE_ANALYTICS === true) { %>
(function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', 'GTM-5CKH6WC');
<% } %>
</script>
<% if (ENABLE_GOOGLE_ANALYTICS === true) { %>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TYYJFE9VNQ"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-TYYJFE9VNQ'); </script>
<% } %>
<!-- End Google Tag Manager -->
<% if (ENABLE_FED_ANALYTICS === true) { %>
<script
Expand Down
Loading

0 comments on commit 91ec2a9

Please sign in to comment.