Title: Console errors
Last modified: October 19, 2017

---

# Console errors

 *  Resolved [MBV](https://wordpress.org/support/users/mbv/)
 * (@mbv)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/console-errors-5/)
 * I’m noticing in console a whole list of errors saying “Uncaught SyntaxError: 
   Unexpected token <”
 * The all refer to the same kind of error…In the page source, here is an example
   error, where it refers to the line with the “</p>”.
 *     ```
       <p>			<script>
       			(function($) {
       				$( '.products .post-1532 a' ).click( function() {
       					if ( true === $(this).hasClass( 'add_to_cart_button' ) ) {
       						return;
       					}</p>
       <p>					ga( 'ec:addProduct', {
       						'id': '1532',
       ```
   
 * I am using Google Analytics Dashboard for WP (GADWP) as well but they said the
   issue is not related to their plugin.
 * I am also using Max Mega Menu plugin and have inserted the woocommerce product
   category shortcode to display products in the menu. I think that’s where the 
   errors might be maybe.

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

 *  Thread Starter [MBV](https://wordpress.org/support/users/mbv/)
 * (@mbv)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/console-errors-5/#post-9604597)
 * Not showing error now…seems to have resolved itself.
 *  [Clement Gonnet](https://wordpress.org/support/users/renoovodesign/)
 * (@renoovodesign)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/console-errors-5/#post-9851625)
 * I’m experiencing a similar issue, where extra JS code is rendered visible on 
   the page.
 * This JS is added after each Add to Basket buttons on product list. However it
   only seems to appear on my Storefront theme homepage and not in the shop page.
   `(
   function($) { $( '.products .post-58 a' ).click( function() { if ( true === $(
   this).hasClass( 'add_to_cart_button' ) ) { return; } ga( 'ec:addProduct', { '
   id': '58', 'name': 'Small Crystal Nail File', 'category': 'Nail Files', 'position':'
   1' }); ga( 'ec:setAction', 'click', { list: 'Product List' }); ga( 'send', 'event','
   UX', 'click', ' Product List' ); }); })(jQuery);`
 * Issue with shortcodes maybe?
 *  [Dswt](https://wordpress.org/support/users/nilaydswt/)
 * (@nilaydswt)
 * [8 years ago](https://wordpress.org/support/topic/console-errors-5/#post-10241890)
 * Did you fixed this issue [@renoovodesign](https://wordpress.org/support/users/renoovodesign/)?
 * I am facing the same issue. Any help would be really appreciated.

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

The topic ‘Console errors’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-google-analytics-integration/assets/icon-256x256.
   png?rev=3234358)
 * [Google Analytics for WooCommerce](https://wordpress.org/plugins/woocommerce-google-analytics-integration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-google-analytics-integration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-google-analytics-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-google-analytics-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-google-analytics-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-google-analytics-integration/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Dswt](https://wordpress.org/support/users/nilaydswt/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/console-errors-5/#post-10241890)
 * Status: resolved