Skip to content

Commit

Permalink
🐛 Google Analytics 配置判断
Browse files Browse the repository at this point in the history
  • Loading branch information
mobeicanyue authored and zkqiang committed Jan 30, 2024
1 parent 781fd8e commit 341f576
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layout/_partials/plugins/analytics.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</script>
<% } %>
<% if (theme.web_analytics.google){ %>
<% if (theme.web_analytics.google && theme.web_analytics.google.measurement_id){ %>
<!-- Google tag (gtag.js) -->
<script async>
if (!Fluid.ctx.dnt) {
Expand All @@ -25,7 +25,7 @@
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', '<%- theme.web_analytics.google.measurement_id %>');
gtag('config', '<%= theme.web_analytics.google.measurement_id %>');
});
}
</script>
Expand Down

0 comments on commit 341f576

Please sign in to comment.