Last active
March 28, 2019 16:18
-
-
Save blogtutor/61e417297d3f8a2e4a223b135f096c6a to your computer and use it in GitHub Desktop.
Adjusted Bounce Rate for Google Global Site Tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* insert after gtag('config') */ | |
| /* setTimeout("gtag('event', 'adjusted bounce rate', {'event_label':'More than 20 seconds'})",20000 ); */ | |
| <!-- Global site tag (gtag.js) - Google Analytics --> | |
| <script async src="https://www.googletagmanager.com/gtag/js?id=UA-12345678-1"></script> | |
| <script> | |
| window.dataLayer = window.dataLayer || []; | |
| function gtag(){dataLayer.push(arguments);} | |
| gtag('js', new Date()); | |
| gtag('config', 'UA-12345678-1', { 'anonymize_ip': true }); | |
| setTimeout("gtag('event', 'adjusted bounce rate', {'event_label':'More than 20 seconds'})",20000 ); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment