Skip to content

Commit

Permalink
Merge pull request #336 from NYCPlanning/12203-add-fullstory-ga4
Browse files Browse the repository at this point in the history
12203 Add GA4 and FullStory
  • Loading branch information
dhochbaum-dcp authored Feb 6, 2023
2 parents 2c8aec6 + 5d027aa commit f68a9bb
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You will need the following things properly installed on your computer.

- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/) (with NPM)
- This installation was tested using Node v10.24.1
- This installation was tested using Node v12.22.1
- [Ember CLI](https://ember-cli.com/)
- [Yarn](https://yarnpkg.com/)

Expand Down
25 changes: 25 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,31 @@
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

<!-- FullStory -->
<script>
window['_fs_host'] = 'fullstory.com';
window['_fs_script'] = 'edge.fullstory.com/s/fs.js';
window['_fs_org'] = 'o-19S9J2-na1';
window['_fs_namespace'] = 'FS';
(function(m,n,e,t,l,o,g,y){
if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].');} return;}
g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[];
o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;
y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);
g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};
g.anonymize=function(){g.identify(!!0)};
g.shutdown=function(){g("rec",!1)};g.restart=function(){g("rec",!0)};
g.log = function(a,b){g("log",[a,b])};
g.consent=function(a){g("consent",!arguments.length||a)};
g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
g.clearUserCookie=function(){};
g.setVars=function(n, p){g('setVars',[n,p]);};
g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];
if(m[y])m[y]=function(){return g._w[y].apply(this,arguments)};
g._v="1.3.0";
})(window,document,window['_fs_namespace'],'script','user');
</script>

{{content-for "head"}}

<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
Expand Down
10 changes: 10 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ module.exports = function(environment) {
sendHitTask: environment !== 'development' && environment !== 'ga-development',
},
},
{
name: 'GoogleAnalyticsFour',
environments: ['development', 'production'],
config: {
id: 'G-MZLX2P6SNE',
options: {
debug_mode: environment === 'development',
},
},
},
],
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"ember-macro-helpers": "1.0.0",
"ember-mapbox-gl": "0.9.1",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-metrics": "0.12.1",
"ember-metrics": "^2.0.0-beta.2",
"ember-moment": "^7.7.0",
"ember-parachute": "0.3.7",
"ember-power-select": "^1.9.6",
Expand Down
Loading

0 comments on commit f68a9bb

Please sign in to comment.