Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Google Analytics

jQuery is undefinedTracking code
    • 10 years, 2 months ago privacylab
      Participant

      Expired

      Hi,

      I’m having trouble to get Google Analytics working. I added the code in here: Specular/General Options/Tracking Code. Could you please check if I the added code is right:

      /*jQuery(document).ready(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
      
       
      
      ga('create', 'TRACKINGCODE', 'auto');
      
      ga('send', 'pageview');
      
      */

      Thanks!

    • 10 years, 2 months ago Mirela
      Participant

      Hello,

      Please remove the comment symbols at the beginning and the end. The /* and */ and try again. Let us know.

      Best regards!

    • 10 years, 2 months ago deplume
      Participant

      Expired

      Well I have a similar issue. I get ‘jQuery ‘ is undefined error when I place this code in the Specular->General options-> ‘Tracking code’ section. Please HELP!

      jQuery(document).ready(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){

      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

      })(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);

      ga(‘create’, ‘UA-44803687-6’, ‘auto’);

      ga(‘send’, ‘pageview’);

    • 10 years, 2 months ago Mirela
      Participant

      Hello,

      Please make sure you have pasted it right. I tested your code and didn’t get any error. If you can send us your wp credentials in aprivate reply, so we can give it a look.

      Best regards!

    • 9 years, 10 months ago tresipunt
      Participant

      Expired

      You have to put the code without the jQuery(document).ready, because the jquery is declared after de google analytics code.

      I hope I help yoy!

      Best regards!

Viewing 4 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password