• Hi Rocco, if you’re able to help.

    I am using Customizer Theme with a child theme created by Childify Me over 2 years ago (and still love both).
    Childify Me creates the 2 standard files for us: style.css & functions.php

    As I understand it, to use Google Analytics, it’s best to put its code into the header.php. (I don’t like using extra plugins.)

    If there is an absolutely safe way to do this with the Customizr theme, can you please advise me how to? I am not finding info on how to do this here at www.remarpro.com.

    Also, if there are bad issues that crop up by doing this, can you please warn me?

    I wonder things like this:

    1. Do I duplicate the existing header.php into my child theme’s directory or do I start a new blank .php page in my child theme’s directory?
    2. Where do I put the code to tell my child theme to acknowledge my new header.php file?
    3. What would that code be?

    Thanks.

    PS: If the how-to is the same for all themes and Childify Me works with all/most themes, shall I post this there instead or as well to help more people.

Viewing 1 replies (of 1 total)
  • Hi Deb,
    to me the best way to add the ga code without plugins, in your child-teme, is this one:
    https://presscustomizr.com/snippet/adding-google-analytics-customizr/

    This method is valid for all the themes (read: doesn’t depend on the theme, nor on Childify Me ;)).

    Copying the header.php in your child-theme and add the code there is also good, but this method has the down-side that, even if rare, you have to make sure, at each theme update, you’re not missing any change (improvement) the theme author might have been made to the original file.

    Hope this helps ??

Viewing 1 replies (of 1 total)
  • The topic ‘Adding header.php to Customizer Theme child theme’ is closed to new replies.