Add Fullscreen in viewer, Track links with Google Analytics, Use .env file
All checks were successful
continuous-integration/drone/push Build is passing

- Fullscreen is a component that watches a store value set by the Carousel component on a picture click
- Use a .env file for API and website related settings and informations
- Google Analytics is now in place, tracking each routes link and viewer photo change
This commit is contained in:
2020-03-28 15:21:51 +01:00
parent 23db9e343c
commit 0635b65abf
20 changed files with 384 additions and 138 deletions

View File

@@ -175,3 +175,15 @@ export const parallaxAnime = (element, anime) => {
}
}
}
/*
** Google Analytics send page
*/
export const analyticsUpdate = (page, id = process.env.CONFIG.GA_TRACKER_ID) => {
if (typeof gtag !== 'undefined') {
window.gtag('config', id, {
page_path: page
})
}
}