Skip to content

Commit

Permalink
Merge branch 'release/23.09.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
adlius committed Aug 16, 2023
2 parents 68c3f0f + a1f3477 commit 6a0a8d3
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [23.09.0] - 2023-08-16
### Changed
- Added Google Tag Manager

## [23.08.0] - 2023-07-13
### Changed
- Removed remaining Bootstrap components
Expand Down Expand Up @@ -1932,6 +1936,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- Quick Files

[23.09.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.09.0
[23.08.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.08.0
[23.07.0]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.07.0
[23.06.1]: https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.06.1
Expand Down
1 change: 1 addition & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
{{content-for "head-footer"}}
</head>
<body>
{{content-for "gtm"}}
{{content-for "assets"}}
<noscript>
<p>
Expand Down
1 change: 1 addition & 0 deletions config/environment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ declare const config: {
rootURL: string;
assetsPrefix: string;
sentryDSN: string | null;
googleTagManagerId: string | null;
sentryOptions: {
release?: string;
ignoreErrors: string[];
Expand Down
9 changes: 9 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const {
FB_APP_ID,
GIT_COMMIT: release,
GOOGLE_ANALYTICS_ID,
GOOGLE_TAG_MANAGER_ID,
KEEN_CONFIG: keenConfig,
LINT_ON_BUILD: lintOnBuild = false,
MIRAGE_ENABLED = false,
Expand Down Expand Up @@ -76,6 +77,7 @@ module.exports = function(environment) {
assetsPrefix,
locationType: 'auto',
sentryDSN: null,
googleTagManagerId: null,
sentryOptions: {
release,
ignoreErrors: [
Expand Down Expand Up @@ -119,6 +121,13 @@ module.exports = function(environment) {
version: 'dimension5',
},
},
{
name: 'GoogleTagManager',
environments: GOOGLE_TAG_MANAGER_ID ? ['all'] : [],
config: {
id: GOOGLE_TAG_MANAGER_ID,
},
},
],
FB_APP_ID,
OSF: {
Expand Down
16 changes: 16 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,22 @@ module.exports = function(defaults) {
postProcess,
/* eslint-enable max-len */
},
gtm: {
enabled: IS_PROD,
content: `<script>
var configJson = document.head.querySelector("meta[name$='/config/environment']").content;
var configObject = JSON.parse(unescape(configJson));
if (configObject.googleTagManagerId) {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', configObject.googleTagManagerId);
}
</script>
`,
postProcess,
},
},
'ember-cli-babel': {
includePolyfill: IS_PROD,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-osf-web",
"version": "23.08.0",
"version": "23.09.0",
"private": true,
"description": "Ember front-end for the Open Science Framework",
"homepage": "https://github.com/CenterForOpenScience/ember-osf-web#readme",
Expand Down

0 comments on commit 6a0a8d3

Please sign in to comment.