Home › Forums › Main Forum › General Topics › Google analytics
Hi Andre, I was wondering if you can tell where to add the google analytics code UA- number. Thanks
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.
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.
Thanks Glenda, and glad to hear things are going well for you. Cheers!
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
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.
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” ????
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.
:-\ 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?
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.
With our premium themes, we offer access to site documentation, video tutorials and timely support. Even if you have just started on WordPress, our support staff have the patience to help you create appealing sites gracefully.
Company
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.To find out more, including how to control cookies, see here: Privacy Policy
© Copyright © 2023 Styled Themes. All Right Reserved.