Skip to content

Commit 9ab6a5e

Browse files
authored
Merge pull request #2347 from tekdi/release-1.13.0-prod
Release 1.13.0 prod to learner prod
2 parents 2cbdcb2 + 5bd8340 commit 9ab6a5e

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.github/workflows/qa-deployment-learner.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ jobs:
6060
docker-compose up -d --force-recreate --no-deps
6161
docker system prune -af || true
6262
docker ps -a
63-
sudo systemctl restart nginx
63+
sudo systemctl restart nginx

apps/learner-web-app/src/components/GoogleAnalyticsTracker/GoogleAnalyticsTracker.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ const GoogleAnalyticsTracker = () => {
2828
window.GA_INITIALIZED = true;
2929
}
3030
}
31+
console.log(pathname, 'pathname');
32+
if(pathname =="/themantic") {
33+
console.log('Initializing GA for Themantic');
34+
logPageView(`/`);
35+
}
36+
else {
3137
logPageView(pathname);
32-
38+
}
3339
}, [pathname]);
3440

3541
return null;

apps/learner-web-app/src/components/themantic/content/List.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ const List: React.FC<ListProps> = ({
3535
className = '',
3636
}) => {
3737
const pathname = usePathname();
38-
const { pageViews, loading, error } = usePageViewCount(pathname);
38+
console.log(pathname, 'pathname');
39+
const { pageViews, loading, error } = usePageViewCount("/");
40+
const { pageViews: pageViewsCount, loading: loadingCount, error: errorCount } = usePageViewCount("/themantic");
41+
3942

4043
const [totalCount, setTotalCount] = useState<number>(0);
4144
const [selectedFilter, setSelectedFilter] = useState<any>('');
@@ -236,7 +239,7 @@ const List: React.FC<ListProps> = ({
236239
</Box>
237240

238241
</Box>
239-
{pageViews && <Box sx={{
242+
{pageViews && pageViewsCount && <Box sx={{
240243
fontSize: '16px',
241244
color: '#363d47',
242245
fontWeight: 500,
@@ -248,7 +251,7 @@ const List: React.FC<ListProps> = ({
248251
width: 'fit-content',
249252
mx: 'auto'
250253
}}>
251-
Total Visitors: {pageViews}
254+
Total Visitors: {pageViews+pageViewsCount}
252255
</Box>}
253256
</Box>
254257
</Box>

0 commit comments

Comments
 (0)