added google analytics code to the environment.prod.ts file and the ability to specify builds for each environment
parent
e0e01da782
commit
edd7c4747f
|
@ -6,7 +6,8 @@ WORKDIR /usr/src/app
|
|||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
ARG selene_env
|
||||
RUN npm run build-${selene_env}
|
||||
|
||||
# STAGE TWO: build the web server and copy the compiled angular app to it.
|
||||
FROM nginx:latest
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --open --proxy-config proxy.config.json",
|
||||
"build": "ng build",
|
||||
"build-dev": "ng build",
|
||||
"build-test": "ng build",
|
||||
"build-prod": "ng build --prod",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
export const environment = {
|
||||
production: true
|
||||
production: true
|
||||
};
|
||||
|
||||
document.write(
|
||||
'<script async src="https://www.googletagmanager.com/gtag/js?id=UA-101772425-11"></script>'
|
||||
);
|
||||
document.write(
|
||||
'<script>' +
|
||||
'window.dataLayer = window.dataLayer || []; ' +
|
||||
'function gtag(){dataLayer.push(arguments);} ' +
|
||||
'gtag("js", new Date()); ' +
|
||||
'gtag("config", "UA-101772425-11"); ' +
|
||||
'</script>'
|
||||
);
|
Loading…
Reference in New Issue