Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern Google Analytics handling now supported #205

Closed
arvgta opened this issue Jul 1, 2020 · 1 comment
Closed

Modern Google Analytics handling now supported #205

arvgta opened this issue Jul 1, 2020 · 1 comment

Comments

@arvgta
Copy link
Owner

@arvgta arvgta commented Jul 1, 2020

There was a timing problem when using the following code. It should now work:

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-12345678-9"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-12345678-9', {'page_path': location.href.replace(location.origin, "") });
</script>
@arvgta
Copy link
Owner Author

@arvgta arvgta commented Jul 19, 2020

Closing as there are no complaints...

@arvgta arvgta closed this as completed Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant