Skip to content

Commit

Permalink
Add dual tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
sylhare committed May 27, 2022
1 parent 33e2799 commit b27f163
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions _includes/default/head.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
const cookieName = 'cookie-notice-dismissed-{{ site.url }}';
const isCookieConsent = '{{ site.cookie_consent }}';
const analyticsName = '{{ site.google_analytics }}';
const analyticsNameGA4 = '{{ site.google_analytics_ga4 }}';
</script>

{% if site.cookie_consent %}
Expand Down
1 change: 1 addition & 0 deletions assets/js/partials/cookie_consent_init.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function googleAnalytics() {
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', analyticsName);
gtag('config', analyticsNameGA4);

// Google analytics
window.ga = window.ga || function () { (ga.q = ga.q || []).push(arguments) };
Expand Down

0 comments on commit b27f163

Please sign in to comment.