• Resolved MBV


    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' ) ) {
    <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)
  • Not showing error now…seems to have resolved itself.

    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?



    Did you fixed this issue @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.