Skip to content

Commit

Permalink
fix: google analytics script tags axodotdev#699
Browse files Browse the repository at this point in the history
  • Loading branch information
voznik authored May 18, 2024
1 parent fb97859 commit 0072295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/site/layout/javascript/analytics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const FATHOM_SCRIPT_URL: &str = "https://cdn.usefathom.com/script.js";

impl Google {
pub fn get_script(&self) -> String {
format!("window.dataLayer = window.dataLayer || []; function gtag(){{dataLayer.push(arguments);}} gtag('js', new Date());gtag('config', '{}');", self.tracking_id)
format!("<script>window.dataLayer = window.dataLayer || []; function gtag(){{dataLayer.push(arguments);}} gtag('js', new Date());gtag('config', '{}');</script>", self.tracking_id)
}
}

Expand Down

0 comments on commit 0072295

Please sign in to comment.