Add GA to landing pages and fix build constant
This commit is contained in:
parent
f4b1ab59e0
commit
62d66fac75
|
|
@ -11,10 +11,10 @@ pipelines:
|
|||
- popd
|
||||
- pushd jam-ui/cicd
|
||||
- npm install
|
||||
- NODE_ENV=production PUBLIC_URL=https://staging.jamkazam.com REACT_APP_ORIGIN=staging.jamkazam.com REACT_APP_BASE_URL=https://staging.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://staging.jamkazam.com REACT_APP_API_BASE_URL=https://staging.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT ENVIRONMENT=staging ./generate.sh
|
||||
- NODE_ENV=production PUBLIC_URL=https://staging.jamkazam.com REACT_APP_ORIGIN=staging.jamkazam.com REACT_APP_BASE_URL=https://staging.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://staging.jamkazam.com REACT_APP_API_BASE_URL=https://staging.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT REACT_APP_GOOGLE_ANALYTICS_ID=G-8W0GTL53NT ENVIRONMENT=staging ./generate.sh
|
||||
- popd
|
||||
- cd jam-ui
|
||||
- NODE_ENV=production CI=false PUBLIC_URL=https://staging.jamkazam.com REACT_APP_ORIGIN=staging.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://staging.jamkazam.com REACT_APP_BASE_URL=https://staging.jamkazam.com REACT_APP_API_BASE_URL=https://staging.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT npm run build
|
||||
- NODE_ENV=production CI=false PUBLIC_URL=https://staging.jamkazam.com REACT_APP_ORIGIN=staging.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://staging.jamkazam.com REACT_APP_BASE_URL=https://staging.jamkazam.com REACT_APP_API_BASE_URL=https://staging.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT REACT_APP_GOOGLE_ANALYTICS_ID=G-8W0GTL53NT npm run build
|
||||
artifacts:
|
||||
- jam-ui/build/**
|
||||
- step:
|
||||
|
|
@ -58,10 +58,10 @@ pipelines:
|
|||
- popd
|
||||
- pushd jam-ui/cicd
|
||||
- npm install
|
||||
- NODE_ENV=production ENVIRONMENT=production PUBLIC_URL=https://www.jamkazam.com REACT_APP_ORIGIN=jamkazam.com REACT_APP_BASE_URL=https://www.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://www.jamkazam.com REACT_APP_API_BASE_URL=https://www.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT ./generate.sh
|
||||
- NODE_ENV=production ENVIRONMENT=production PUBLIC_URL=https://www.jamkazam.com REACT_APP_ORIGIN=jamkazam.com REACT_APP_BASE_URL=https://www.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://www.jamkazam.com REACT_APP_API_BASE_URL=https://www.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT REACT_APP_GOOGLE_ANALYTICS_ID=G-SPTNJRW7WB ./generate.sh
|
||||
- popd
|
||||
- cd jam-ui
|
||||
- NODE_ENV=production CI=false PUBLIC_URL=https://www.jamkazam.com REACT_APP_ORIGIN=jamkazam.com REACT_APP_BASE_URL=https://www.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://www.jamkazam.com REACT_APP_API_BASE_URL=https://www.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT npm run build
|
||||
- NODE_ENV=production CI=false PUBLIC_URL=https://www.jamkazam.com REACT_APP_ORIGIN=jamkazam.com REACT_APP_BASE_URL=https://www.jamkazam.com REACT_APP_CLIENT_BASE_URL=https://www.jamkazam.com REACT_APP_API_BASE_URL=https://www.jamkazam.com/api REACT_APP_BITBUCKET_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER REACT_APP_BITBUCKET_COMMIT=$BITBUCKET_COMMIT REACT_APP_GOOGLE_ANALYTICS_ID=G-SPTNJRW7WB npm run build
|
||||
|
||||
artifacts:
|
||||
- jam-ui/build/**
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {Navbar} from "reactstrap";
|
|||
import {topNavbarBreakpoint} from "../../config";
|
||||
import Logo from "../navbar/Logo";
|
||||
import {BrowserQueryProvider} from "../../context/BrowserQuery";
|
||||
import {initGA, logPageView } from "../../helpers/analytics";
|
||||
import Footer from "../footer/JKFooter";
|
||||
|
||||
const ArtistTemplatePage = ({ original_artist_slug, artist, songs}) => {
|
||||
|
|
@ -23,6 +24,8 @@ const ArtistTemplatePage = ({ original_artist_slug, artist, songs}) => {
|
|||
const paddingClass = greaterThan.sm ? "px-6" : "px-1";
|
||||
|
||||
useEffect(() => {
|
||||
initGA();
|
||||
logPageView(window.location.pathname + window.location.search);
|
||||
//see if there is affiliate in query string and save it as cookie
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const affiliate = urlParams.get('affiliate');
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {topNavbarBreakpoint} from "../../config";
|
|||
import Logo from "../navbar/Logo";
|
||||
import {BrowserQueryProvider} from "../../context/BrowserQuery";
|
||||
import Footer from "../footer/JKFooter";
|
||||
import {initGA, logPageView } from "../../helpers/analytics";
|
||||
|
||||
const TemplatePage = ({ id, plan_code, slug, artist, song, location}) => {
|
||||
console.log('TemplatePage', id, plan_code, slug, artist, song, location);
|
||||
|
|
@ -25,6 +26,9 @@ const TemplatePage = ({ id, plan_code, slug, artist, song, location}) => {
|
|||
const paddingClass = greaterThan.sm ? "px-6" : "px-1";
|
||||
|
||||
useEffect(() => {
|
||||
initGA();
|
||||
logPageView( window.location.pathname + window.location.search);
|
||||
|
||||
//see if there is affiliate in query string and save it as cookie
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const affiliate = urlParams.get('affiliate');
|
||||
|
|
|
|||
Loading…
Reference in New Issue