Title: Error Uncaught ReferenceError: gtag is not defined
Last modified: April 15, 2018

---

# Error Uncaught ReferenceError: gtag is not defined

 *  Resolved [AleMaciell](https://wordpress.org/support/users/alexandre-maciel/)
 * (@alexandre-maciel)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/)
 * Hey guys o/
 * The plugin displays the following error when you enable the scroll function, 
   and does not load anything in google analytics.
 * Can someone help me?
 * Site Link: [http://edcoracao.com.br/](http://edcoracao.com.br/)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-uncaught-referenceerror-gtag-is-not-defined%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [AleMaciell](https://wordpress.org/support/users/alexandre-maciel/)
 * (@alexandre-maciel)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/#post-10183345)
 * Error:
 * ga-scroll-events.js?ver=2.5.1:51 Uncaught ReferenceError: gtag is not defined
   
   at track_event (ga-scroll-events.js?ver=2.5.1:51) at ga-scroll-events.js?ver=
   2.5.1:157 at dispatch (jquery.js?ver=1.12.4:3) at r.handle (jquery.js?ver=1.12.4:
   3) track_event @ ga-scroll-events.js?ver=2.5.1:51 (anonymous) @ ga-scroll-events.
   js?ver=2.5.1:157 dispatch @ jquery.js?ver=1.12.4:3 r.handle @ jquery.js?ver=1.12.4:
   3
 *  Plugin Author [yuvalo](https://wordpress.org/support/users/yuvalo/)
 * (@yuvalo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/#post-10183365)
 * Hi [@alexandre-maciel](https://wordpress.org/support/users/alexandre-maciel/),
 * I can see that you checked the Global Site Tag box in the General Settings but
   your page is using the Universal Tracking code page.
 * Try to uncheck the Global Site Tag box and make sure that Universal is checked
   and check again.
 * Yuval
 *  Plugin Author [yuvalo](https://wordpress.org/support/users/yuvalo/)
 * (@yuvalo)
 * [8 years ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/#post-10290302)
 * Marking this ticket as resolved due to inactivity. feel free to reopen in case
   the problem persists.
 *  [samckayak](https://wordpress.org/support/users/samckayak/)
 * (@samckayak)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/#post-10521121)
 * I’m new to this add-in and have the same issue… “gtag” is not defined.
 * I’m having a hard time understanding the semantic difference between “Global”
   and “Universal” Site Tag Box. Seems either adjective suggests it applies everywhere???
 * I can’t find either in any of the settings tabs: “Edit Script”, “Manager”, “Settings”,
   or “Docs & FAQ”.
 *  Plugin Author [yuvalo](https://wordpress.org/support/users/yuvalo/)
 * (@yuvalo)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/#post-10521609)
 * Hi [@samckayak](https://wordpress.org/support/users/samckayak/)
 * Over the years, Google has been changing their tracking code and giving it new
   names.
    For a while, what is called the Universal tracking code was used an that
   is the reason that it is the default option in the plugin. No so long ago, they
   launched the new code, Global Site Tags and made it the default for new Google
   Analytics installations.
 * Our plugin supports the Global Site Tags code, but in the current version, requires
   you to manually add it to your website, either by a theme or another Google Analytics
   plugin.
    Once you add the Global Site Tags code to the site, you can enable it
   on our plugin.
 * The next, overdue version of our plugin will default to using the Global Site
   Tags code.
 * Hope that clears things up for the moment.
 * Yuval
 *  [samckayak](https://wordpress.org/support/users/samckayak/)
 * (@samckayak)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/#post-10522635)
 * We have other issues . Server returns an error when we try to update scripts .
 *  Plugin Author [yuvalo](https://wordpress.org/support/users/yuvalo/)
 * (@yuvalo)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/#post-10522790)
 * [@samckayak](https://wordpress.org/support/users/samckayak/), can you tell me
   which scripts?
 *  [samckayak](https://wordpress.org/support/users/samckayak/)
 * (@samckayak)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/#post-10523206)
 * The problem I have at the moment is the server returns an error if I edit/modify
   any of the scripts or change “whole website” to “specific pages”. “403 Forbidden”
 * Do you have any insight into this issue?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error Uncaught ReferenceError: gtag is not defined’ is closed to new 
replies.

 * ![](https://ps.w.org/wp-google-analytics-events/assets/icon-256x256.jpeg?rev=
   2189709)
 * [WP Google Analytics Events - No-Code Custom Event Tracking for Google Analytics](https://wordpress.org/plugins/wp-google-analytics-events/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-google-analytics-events/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-google-analytics-events/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-google-analytics-events/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-google-analytics-events/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-google-analytics-events/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [samckayak](https://wordpress.org/support/users/samckayak/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/error-uncaught-referenceerror-gtag-is-not-defined/#post-10523206)
 * Status: resolved