Okay
  Public Ticket #1217199
Google Analytics tracking code
Closed

Comments

  •  2
    Kevin started the conversation

    Hi Barry,

    I wanted to add a Google Analytics tracking code and to the theme and I came across a ticket outlining an option that I coud follow. https://qreativethemes.ticksy.com/search/?q=Google+Analytics+

    Your message on the ticket was as follows:

    ((To add the Google Analytics tracking code please follow these steps below:

    1. Install the Custom CSS & JavaScript plugin 2. After activating navigate to Appearance > Custom JavaScript 3. Add your analytics JavaScript script code (not the tracking ID) 4. Save the page.))

    I've copied your instructions above and also downloaded the plugin. However, it has not worked for me.

    When I go to my Google Webmaster Central page and click VERIFY Google Analytics, I receive a Verification failed message.

    This is a copy of the Javascript code used;


    <script>
      (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','https://www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-73623330-4', 'auto');
      ga('send', 'pageview');

    </script>


    Many thanks,

    Kevin




  •  1,710
    Barry replied

    Hi Kevin,

    If you have the latest theme version running you can also try to add the Google Analytics scripts in Appearance > Customize > Theme Options > Custom > Custom header JS:

    <script>
        (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','https://www.google-analytics.com/analytics.js','ga');
        ga('create', 'UA-73623330-4', 'auto');
        ga('send', 'pageview');
    </script>
    

    When that doesn't work can you copy the failed from Analytics in here?

    Thank you

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  •  2
    Kevin replied

    Hi Barry,

    Just to let you know that add in the scripts in Appearance > Customize > Theme Options > Custom > Custom header JS, worked first time :-)

    Sorry to trouble with the request for help. Thats why I checked out first past customer tickets. I'll uninstall the Custom CSS & JavaScript plugin as it will not be needed.

    Many thanks and have a great weekend.
    Regards, Kevin

  •  1,710
    Barry replied

    Great! Thank you for letting me know. 

    You're welcome. Have a great weekend too!

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes

  •  2
    Kevin replied

    Hi Barry,

    Do you know of away, if with a plugin. How I can add more meta keywords to the theme pages?

    I'm using yoast SEO but the free option only allows me to add 1 keyword!

    Cheers,

    Kevin

  •  1,710
    Barry replied

    Hi Kevin,

    The free version of Yoast SEO only allows to add 1 keyword indeed. I'm not really that familiar with other SEO plugins, but you can try the 'All in One SEO Pack' plugin, which is also a very popular SEO plugin. Maybe that plugin will allows you to add more than 1 keywords. By default the keyword option is disabled so you have to enable it, see link

    Please note that meta keywords are not really valuable anymore in today's SEO (article).

    Let me know if you have any questions.

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes