Google analytics

Home Forums Main Forum General Topics Google analytics

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #13958
    Glenda
    Member

    Hi Andre, I was wondering if you can tell where to add the google analytics code UA- number. Thanks

    #18055
    Sushil Adhikari
    Moderator

    This will depend on the code being used because I know Google has one where it goes just before the closing tags and the other goes before the closing tags. You will need to confirm which one and then it will either be in the header.php file or the footer.php file of a theme. (this is probably where you want to use a child theme so you can do theme updates without losing the code)….unless after any update, you re-add your code.

    #18056
    Glenda
    Member

    Thanks for that Andre. I have already started using the child theme to make some of these changes. By the way, I have added Styled Themes to my website. Its a free business directory for anyone who wants to register, It’s not far off being complete and I am really happy with the way it looks and had had so many great compliments. Looking forward to spreading the word around to help business succeed.

    http://www.lrodirectory.com

    #18057
    Sushil Adhikari
    Moderator

    Thanks Glenda, and glad to hear things are going well for you. Cheers!

    #19168
    Roland
    Member

    Andre:

    I know how to insert the code into the parent theme . . . but where do we (or how) install the code when using the child?

    ~R

    #19169
    Sushil Adhikari
    Moderator

    You have two choices… use a Google Analytics plugin or you will need to copy the header.php into the child theme (if you are putting the code in the or the footer.php if you are putting the code at the bottom.

    #19170
    Roland
    Member

    I try not to use plugins, A:

    So if I were a manly-man with coding skills I would:

    a) copy the header (let’s assume header) php

    b) paste it here? (see image attached)

    c) revise the header php to Googles standards.

    d) “Save” ????

    GoogAnalytics.jpg

    Attachments:
    You must be logged in to view attached files.
    #19171
    Sushil Adhikari
    Moderator

    You would copy the header.php file and uploaded into the child theme where you see the child theme’s style.css (not into the style.css file) then make your change (adding your google code).

    By the way, I see your title code in your stylesheet above as:

    #post-14 .entry-title {
    display: none;
    }

    That was to hide your front page title correct? I have a much better solution which I discovered last night….and I know you said you try not to use plugins, but this is something you might want to consider:

    http://wordpress.org/plugins/toggle-the-title/

    ….it adds an on/off option on each page editor window to disable the titles on any page.

    #19172
    Roland
    Member

    :-\ I’m not following.

    I went into my Styled Themes Master folder, opened Preference, opened Preference Child zip folder and saw:

    Fonts file
    Images file
    screenshot png
    style.css

    so I opened the style css and it looks identical to the page-image I sent you. And I’m thinkin’ “Andre wouldn’t mess with my head like that” so I have to ask . . . what am I misinterpreting?

    #13959
    Sushil Adhikari
    Moderator

    I would never mess with anyone’s head :whistle:
    You need to upload a copy of your header.php file from the parent theme to the child theme folder. The header.php file goes where you see screenshot.png, style.css in the child theme. Once uploaded, you can then go into your dashboard Appearance Editor and edit the header.php file with your google code.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.