WordPress.org

Ready to get started?Download WordPress

Forums

Spun
Adding Code to CSS Manager (3 posts)

  1. GroceryGirl
    Member
    Posted 3 months ago #

    I would like to add the following code into CSS Manager. My blog is http://www.therightcardandmore.com

    <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','//www.google-analytics.com/analytics.js','ga');
    
      ga('create', 'UA-41988766-2', 'therightcardandmore.com');
      ga('send', 'pageview');
    
    </script>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    The code doesn't seem to work "as is". What do I need to add to it to get it to work within CSS Manager? Thanks!!!

  2. esmi
    Forum Moderator
    Posted 3 months ago #

    You cannot add JavaScript to a CSS manager. That's just for CSS - not scripts. Have you considered using a Google Analytics plugin?

  3. GroceryGirl
    Member
    Posted 3 months ago #

    Okay. (Obviously, I still have a lot to learn.)

    I'm not sure which Google Analytics plug-in to choose. Any suggestions?

Reply

You must log in to post.

About this Theme

About this Topic