@use crate::app_config::AppConfig;
@(app_config: &AppConfig)

@if let Some(google_analytics) = &app_config.google_analytics {
<script async src="https://www.googletagmanager.com/gtag/js?id=@google_analytics.ga_measurement_id"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag()@{window.dataLayer.push(arguments);@}
gtag('js', new Date());
gtag('config', '@google_analytics.ga_measurement_id');
</script>
}
