File tree Expand file tree Collapse file tree 6 files changed +33
-1
lines changed Expand file tree Collapse file tree 6 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
55and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
66
7+ ## [ 23.09.0] - 2023-08-16
8+ ### Changed
9+ - Added Google Tag Manager
10+
711## [ 23.08.0] - 2023-07-13
812### Changed
913- Removed remaining Bootstrap components
@@ -1932,6 +1936,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
19321936### Added
19331937- Quick Files
19341938
1939+ [ 23.09.0 ] : https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.09.0
19351940[ 23.08.0 ] : https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.08.0
19361941[ 23.07.0 ] : https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.07.0
19371942[ 23.06.1 ] : https://github.com/CenterForOpenScience/ember-osf-web/releases/tag/23.06.1
Original file line number Diff line number Diff line change 2222 {{content-for "head-footer"}}
2323 </ head >
2424 < body >
25+ {{content-for "gtm"}}
2526 {{content-for "assets"}}
2627 < noscript >
2728 < p >
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ declare const config: {
2828 rootURL : string ;
2929 assetsPrefix : string ;
3030 sentryDSN : string | null ;
31+ googleTagManagerId : string | null ;
3132 sentryOptions : {
3233 release ?: string ;
3334 ignoreErrors : string [ ] ;
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const {
2424 FB_APP_ID ,
2525 GIT_COMMIT : release ,
2626 GOOGLE_ANALYTICS_ID ,
27+ GOOGLE_TAG_MANAGER_ID ,
2728 KEEN_CONFIG : keenConfig ,
2829 LINT_ON_BUILD : lintOnBuild = false ,
2930 MIRAGE_ENABLED = false ,
@@ -76,6 +77,7 @@ module.exports = function(environment) {
7677 assetsPrefix,
7778 locationType : 'auto' ,
7879 sentryDSN : null ,
80+ googleTagManagerId : null ,
7981 sentryOptions : {
8082 release,
8183 ignoreErrors : [
@@ -119,6 +121,13 @@ module.exports = function(environment) {
119121 version : 'dimension5' ,
120122 } ,
121123 } ,
124+ {
125+ name : 'GoogleTagManager' ,
126+ environments : GOOGLE_TAG_MANAGER_ID ? [ 'all' ] : [ ] ,
127+ config : {
128+ id : GOOGLE_TAG_MANAGER_ID ,
129+ } ,
130+ } ,
122131 ] ,
123132 FB_APP_ID ,
124133 OSF : {
Original file line number Diff line number Diff line change @@ -106,6 +106,22 @@ module.exports = function(defaults) {
106106 postProcess,
107107 /* eslint-enable max-len */
108108 } ,
109+ gtm : {
110+ enabled : IS_PROD ,
111+ content : `<script>
112+ var configJson = document.head.querySelector("meta[name$='/config/environment']").content;
113+ var configObject = JSON.parse(unescape(configJson));
114+ if (configObject.googleTagManagerId) {
115+ window.dataLayer = window.dataLayer || [];
116+ function gtag(){dataLayer.push(arguments);}
117+ gtag('js', new Date());
118+
119+ gtag('config', configObject.googleTagManagerId);
120+ }
121+ </script>
122+ ` ,
123+ postProcess,
124+ } ,
109125 } ,
110126 'ember-cli-babel' : {
111127 includePolyfill : IS_PROD ,
Original file line number Diff line number Diff line change 11{
22 "name" : " ember-osf-web" ,
3- "version" : " 23.08 .0" ,
3+ "version" : " 23.09 .0" ,
44 "private" : true ,
55 "description" : " Ember front-end for the Open Science Framework" ,
66 "homepage" : " https://github.com/CenterForOpenScience/ember-osf-web#readme" ,
You can’t perform that action at this time.
0 commit comments