• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Google Analytics Not Working

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Google Analytics Not Working

This topic is: not resolved

Tagged: analytics

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 2 months ago by ericmccarty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 28, 2015 at 1:54 pm #145954
    ericmccarty
    Member

    Analytics is not working.

    I'm using Paralax Pro theme. WP 4.1.1. Genesis 2.1.2

    Here's my footer.php file.

    <?php
    /**
     * Genesis Framework.
     *
     * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
     * Please do all modifications in the form of a child theme.
     *
     * @package Genesis\Templates
     * @author  StudioPress
     * @license GPL-2.0+
     * @link    http://my.studiopress.com/themes/genesis/
     */
    
    genesis_structural_wrap( 'site-inner', 'close' );
    echo '</div>'; //* end .site-inner or #inner
    
    do_action( 'genesis_before_footer' );
    do_action( 'genesis_footer' );
    do_action( 'genesis_after_footer' );
    
    echo '</div>'; //* end .site-container or #wrap
    
    do_action( 'genesis_after' );
    wp_footer(); //* we need this for plugins
    ?>
    <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-8194201-24', 'auto');
      ga('send', 'pageview');
    
    </script>
    <?php wp_footer(); ?>
    </body>
    </html>
    http://www.ericmccartyphoto.com
    March 28, 2015 at 3:54 pm #145967
    Christoph
    Member

    Hi,

    try pasting your analytics code into Genesis - Theme Settings - Header and Footer Scripts.


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

    March 28, 2015 at 4:30 pm #145968
    ericmccarty
    Member

    Thanks Christoph,

    I had tried it in the footer script several times, but it wouldn't work there. Put it in the header script just now and it worked. Not sure why it wouldn't work in the footer script, but it's working in the header, so I'm fine.

    Thanks for the help.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble