WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
Adding Google Analytics Tracking Code to Customizr Child Theme (5 posts)

  1. xondra
    Member
    Posted 6 months ago #

    Hello everybody. I am trying to create my own webpage based on WP and I've reached the point where I want to add the GA tracking code to the theme. I found the instructions provided by Nicolas to add the code to the functions.php file of the theme, but it doesn't work.

    While I'm not very knowledgeable in .php, it amazes me that more detailed instructions are not provided. The code is there, but I don't think I know where exactly it should be added, and it's creating parsing errors. I tried creating a custom functions.php file for a child theme and it doesn't work either.

    I want to keep the child theme scheme, I only need help on how to add the code to the custom functions.php file.

    Thanks in advance!

  2. ElectricFeet
    Member
    Posted 6 months ago #

    I found the instructions provided by Nicolas to add the code to the functions.php file of the theme.

    Yes, it's not clear. This should be in your child theme's functions.php. See here; similar problem.

    You need to:

    1. Restore the original functions.php for your Customizr version
    2. Set up a functions.php file in your child theme and
    3. Add your extras to the child theme's functions.php.

    Let us know what help you need with any of those steps.

  3. xondra
    Member
    Posted 6 months ago #

    I figured that I had to create a child theme after much reading. Thankfully I can speak English for all of this, or else I'd be lost :P

    This time around I added a tiny <?php at the beginning of my functions.php file for the child theme, and it worked. The developer is not very clear on this as probably he feels that his users already know that they have to put a beginning and an ending tag to all .php (well, this is mind numbing obvious now, but it wasn't when I felt that it was a copy-paste thing). Yes, I did begin by modifying the original functions.php file, as you pointed out in his page.

    GA says it's installed and working. Thanks for all your help!
    Cheers!

    Xomdra

  4. ElectricFeet
    Member
    Posted 6 months ago #

    It is a free theme that is industrial-strength, though...

  5. xondra
    Member
    Posted 6 months ago #

    Sorry, I don't understand our answer. I know it's a very good theme.

Reply

You must log in to post.

About this Theme

About this Topic

Tags