• I am trying to have google analytics on my website. I chose the popular plugin by Yoast but google analytics says ‘tracking not installed’. I am using a child theme which I have mainly modified within Appearances>Editor.

    Things I have tried (one at a time), which did not work are:

    copying the tracking code into the CSS sheet of my child theme via Appearances>Editor

    copying the tracking code into the CSS sheet of my child theme via Appearances>Editor but typing ‘.header.php’ before it (that was a beginner’s guess)

    going to the twenty twelve style sheet, via Appearances>Editor and adding the code in a blank line above </header>

    opening Notepad, pasting in the code, saving it as analytics.php, copying that file to within my Child Theme folder via Filezilla

    I don’t know what to do, but I try to undo each change I make when it doesn’t work.

    Incidentally, when I check the code from the google page in
    https://jigsaw.w3.org/css-validator/#validate_by_input it says there are six parse errors.

    In Appearance>Editor each time I made a change it said I was successful when I guess I wasn’t.

    So far all the other code I have added has worked by just pasting it in my child theme.

    Thank you very much for your help.

  • The topic ‘How to install google analytics tracking code when using a child theme?’ is closed to new replies.