Skip to content

Commit

Permalink
Re-enabling Google Analytics EEA cookie prevention, see #64, phetsims…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Mar 18, 2024
1 parent ab33c0f commit 911b5b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions js/analytics/google-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@
ad_storage: 'denied',
analytics_storage: 'granted'
} );
// EEA analytics storage denied for cookies, see https://github.com/phetsims/website/issues/1190
gtag( 'consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
region: [ 'BE', 'BG', 'CZ', 'DK', 'CY', 'LV', 'LT', 'LU', 'ES', 'FR', 'HR', 'IT', 'PL', 'PT', 'RO', 'SI', 'HU', 'MT', 'NL', 'AT', 'IS', 'LI', 'NO', 'SK', 'FI', 'SE', 'DE', 'EE', 'IE', 'EL' ]
} );
gtag( 'config', phet.chipper.queryParameters.ga4 );

// Dynamically load the script
Expand All @@ -128,6 +134,12 @@
ad_storage: 'denied',
analytics_storage: 'granted'
} );
// EEA analytics storage denied for cookies, see https://github.com/phetsims/website/issues/1190
gtmTag( 'consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
region: [ 'BE', 'BG', 'CZ', 'DK', 'CY', 'LV', 'LT', 'LU', 'ES', 'FR', 'HR', 'IT', 'PL', 'PT', 'RO', 'SI', 'HU', 'MT', 'NL', 'AT', 'IS', 'LI', 'NO', 'SK', 'FI', 'SE', 'DE', 'EE', 'IE', 'EL' ]
} );
window.dataLayer.push( {
simBrand: phet.chipper.brand,
simName: phet.chipper.project,
Expand Down

0 comments on commit 911b5b4

Please sign in to comment.