Title: Two &#8220;Uncaught SyntaxError&#8221; in the console
Last modified: March 10, 2026

---

# Two “Uncaught SyntaxError” in the console

 *  Resolved [Eclipses](https://wordpress.org/support/users/myerrorsandmysolutions/)
 * (@myerrorsandmysolutions)
 * [6 months ago](https://wordpress.org/support/topic/two-uncaught-syntaxerror-in-the-console/)
 * googlesitekit-modules-tagmanager.min.js:1 Uncaught SyntaxError: Unexpected identifier‘
   Your’ (at googlesitekit-modules-tagmanager.min.js:1:39313)
   googlesitekit-modules-
   adsense.min.js:5 Uncaught SyntaxError: Unexpected identifier ‘Site’ (at googlesitekit-
   modules-adsense.min.js:5:1752)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftwo-uncaught-syntaxerror-in-the-console%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [6 months ago](https://wordpress.org/support/topic/two-uncaught-syntaxerror-in-the-console/#post-18848043)
 * Thanks for reaching out [@myerrorsandmysolutions](https://wordpress.org/support/users/myerrorsandmysolutions/),
   and appreciate you sharing details of this. I’ll perform some checks on this 
   and report back to you here. While doing so, can you share at what stage you 
   notice this errors, or are they consistent when visiting a particular plugin 
   page?
 *  Thread Starter [Eclipses](https://wordpress.org/support/users/myerrorsandmysolutions/)
 * (@myerrorsandmysolutions)
 * [6 months ago](https://wordpress.org/support/topic/two-uncaught-syntaxerror-in-the-console/#post-18848069)
 * Hi, 
   This issue happens in the homepage only when I’m logged in.
 * I use Google Chrome, when I press F12 to pen the DevTolls and see the errors 
   in the Console.
   Thank youEclipses
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [6 months ago](https://wordpress.org/support/topic/two-uncaught-syntaxerror-in-the-console/#post-18848608)
 * Thanks for your patience on this [@myerrorsandmysolutions](https://wordpress.org/support/users/myerrorsandmysolutions/).
   I performed some additional checks on your site and while I can see that you 
   have Tag Manager snippets placed, I can’t be sure if they were placed via Site
   Kit given it looks like all comments are stripped out.
 * I also performed some checks on some test sites, whereby Tag Manager was setup
   and configured via Site Kit, without encountering the same errors despite various
   tags added and remaining logged in. To troubleshoot this further, please share
   the following:
    1. Your[ Site Health information](https://i.imgur.com/Rtkmsba.png). You can[ use this form](https://docs.google.com/forms/d/1lhjns2K7c0Ny7ME4gxTcsnYtNUtcMr8BvFpPQi23Y1E/)
       to share privately if preferred. I can then confirm some possible causes and
       configurations.   
    2. Does the same occur if you temporarily deactivate WP Optimize? I asked as I 
       can see various caching and optimizations performed, which does seem to impact
       Site Kit placed snippets ([screenshot with example](https://i.ibb.co/PvL14zTw/image.png)).
    3. Did you noticed any loss of functionality, or non reporting of site visits in
       Analytics?
 * Let me know if you have any questions with the above. Thank you.
 *  Thread Starter [Eclipses](https://wordpress.org/support/users/myerrorsandmysolutions/)
 * (@myerrorsandmysolutions)
 * [6 months ago](https://wordpress.org/support/topic/two-uncaught-syntaxerror-in-the-console/#post-18848691)
 * Thank you for your support. Here answers to your points
    1. I’ve sent you site health information via your form.
    2. I confirm that with WP Optimize the errors do not show
    3. I did not notice any loss of functionality, I need to test more
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [6 months ago](https://wordpress.org/support/topic/two-uncaught-syntaxerror-in-the-console/#post-18849870)
 * Appreciate you sharing the additional insights [@myerrorsandmysolutions](https://wordpress.org/support/users/myerrorsandmysolutions/).
   I checked and indeed [I could create the same error as you reported](https://i.ibb.co/N655kQ7W/image.png).
   After checking some configurations, it looks like the WP Optimize [option to minify content](https://i.ibb.co/d474SPhj/image.png)
   is causing this console error. While it doesn’t seem to impact any Site Kit standard
   behavior from my testing, there is a warning that “this setting may need specific
   configuration to work on your site”. My expectation is that this can be safely
   ignored, although I will raise this with the team.
 *  If you want to make sure the console error no longer appears, you can also add
   a Site Kit exclusion within WP Optimze, via adding the below to the “Exclude 
   JavaScript from processing” setting within WP Optimize:
   `plugins/google-site-
   kit/`
 * The above seemed to do the trick in my case. Do let me know how you get on with
   the above, or ask if you have any questions. Thanks also for bringing this to
   our attention. Note that it’s not uncommon for third party optimization plugins
   to impact any front end feature of Site Kit, and as with WP Optimize there are
   usually warning or notes when it comes to enabling minification or other optimization
   settings.
 *  Thread Starter [Eclipses](https://wordpress.org/support/users/myerrorsandmysolutions/)
 * (@myerrorsandmysolutions)
 * [6 months ago](https://wordpress.org/support/topic/two-uncaught-syntaxerror-in-the-console/#post-18850019)
 * Perfect, thank you, I’ve added the exclusion in WP Optimize.
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [6 months ago](https://wordpress.org/support/topic/two-uncaught-syntaxerror-in-the-console/#post-18850565)
 * Perfect, that should do it [@myerrorsandmysolutions](https://wordpress.org/support/users/myerrorsandmysolutions/)!
   Thanks for the update. If you encounter any further Site Kit related console 
   errors or if you have any plugin related queries, be sure to get in touch.
 * If you have a moment free please also consider[ sharing your thoughts on the plugin](https://wordpress.org/support/plugin/google-site-kit/reviews/#new-post),
   in particular if you’ve been a Site Kit user for some time.

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

 The topic ‘Two “Uncaught SyntaxError” in the console’ is closed to new replies.

 * ![](https://ps.w.org/google-site-kit/assets/icon-256x256.png?rev=3606666)
 * [Site Kit by Google - Analytics, Search Console, AdSense, Speed](https://wordpress.org/plugins/google-site-kit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-site-kit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-site-kit/)
 * [Active Topics](https://wordpress.org/support/plugin/google-site-kit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-site-kit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-site-kit/reviews/)

## Tags

 * [Uncaught SyntaxError](https://wordpress.org/support/topic-tag/uncaught-syntaxerror/)

 * 7 replies
 * 2 participants
 * Last reply from: [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * Last activity: [6 months ago](https://wordpress.org/support/topic/two-uncaught-syntaxerror-in-the-console/#post-18850565)
 * Status: resolved