Anyone know which page i copy the Google analytics code into on a WP site? (27 posts)

  • Hmm…

    *)

    AB

  • @arty If your theme doesn’t have a admin panel that asks for it, then you put the code in the footer.php template before the < / body > tag of the theme which you can access & edit using the Editor option under Appearance.

  • @arty hope that guidance from  @kristi-hines works! Let me know if you need further assistance.

  • @kristi-hines Thanks guys!

    I checked and this is all I have:

    The W.P. Dashboard has theme > editor > and then a RHS panel with a list of templates including a ‘fotter.php’.

    however, when I opened the footer.php there was nowhere I could find the < / body > tag.

    Is this right? I can’t find any admin panel either…sigh.

    AB

  • @arty are you running wordpress.com or a self hosted domain?

  • @arty What theme? See if there is an options panel for it – sometimes there will just be a simple settings box for your analytics code.

  • @kristi-hines Thanks for the information.

  • You could use the Google Analyticator plugin and have it do it for you. 

    http://wordpress.org/extend/plugins/google-analyticator/

  • @arty try this:
    Go to your template editor and find the Header file. Paste the Analytics code right before the </head> tag. That will also work. The latest Analytics code I used gave those instructions.
    If you still want to use the </body> tag, chances are it will be the CSS file. However a lot of themes don’t include that anymore, so you can’t access any file with the </body> tag. But you can almost always get to the </head> tag.

  • @erikdeckers @kristi-hines @glengorham

    Am using the twenty eleven theme with the header turned off.

    I copied and pasted the code from Google analytics immediately before the closing /head tag on the ‘header’ file as advised, am just waiting for some activity to register and see if it is all working.

    i don’t know how to turn off the silly ‘comments’ thing on my pages, I don’t want to build a blog here where people comment on posts, I just want a website.

    Anyone know how to turn off the comments thing?

    *)

    AB

  • @glengorham

    Whoops sorry, I have my own domain and web hosting service. Am using the Wordpress software to develop the interface so to speak.

    *)

    AB

  • @arty It usually takes 24 hours before you’ll see any activity in Google Analytics.  As far as page comments, there is a setting on each page you create to turn off comments under the Discussion section.  If you don’t see that option, click on the Screen Options at the top right of your dashboard and make sure Discussion is checked.  

  • @kristi-hines

    Yay! Woo. It works. Much better.

    Is there a way to turn off the ‘recent posts’ list thing on the side also??

    T-minus 23 hours Google analytics and counting.

    *)

    AB

  • @arty Recent Posts is a part of your sidebar widgets.  If you go to Appearance > Widgets, you will either see a Recent Posts widget under your sidebar or no widgets (meaning that the Recent Posts is a default one with the theme).  If it’s there, just click on it then click the Delete link.  If it’s not there, then add some widgets of your own and that should get rid of the defaults. 

  • @kristi-hines

    Ok that’s taken care of that, now have a couple of quick questions, sorry am trying to get this BASIC thing sorted today and launch, one is why oh why aren’t my simple contact forms working??

    Every time I try download another version of a pluin, and go to widgets and drag widget ti side panel it never shows up….EVER.

    The second is why oh why are my ‘pages’ displaying differently to my main post. The main post has everything aligned, i.e. the text and images are flush on the LHS with the header and menu, but on the pages it is kind of all over the place and starts about half way down the page??

    Argh help please! I will shut up soon!

    *)

    AB

  • @kristi-hines

    Oh yeah and my social media buttons all just dissapeared, same thing as the contact form widget, can’t get it on there no matter what I try.

    *)

    AB

  • @arty Your theme may not support some of those things. Try switching themes and see if they show up again. If it does, then the problem is your theme.

    We’ve had this happen a few times with clients. It’s just a matter of whether a theme supports certain functions. That’s why it’s always worth springing for a paid theme like Genesis.


  • @erikdeckers

    Thank you for your help, really, but I am soooooo over Wordpress.

    Ok, I have really tried, as you have all seen I have been busy working, spending my time, hours for two weeks now online, doing tutorials, using this forum, trying, trying and I am at less than when I started. AAAAAARGGGHH.

    I am stuck with a stupid Twenty Eleven or whatever it is theme, can’t edit it, and don’t have a contact form or social media buttons and can;t put them on.

    Whenever I try and change themes the screen goes white, nothing works other than the tewnty theme now, I put this down to sorcery.

    I’m giving up, have launched the crappy WP site already as is, no more time on this. Unless I want to un-install WP totally and re-download it and upload it and start putting all my plug ins and preferences back in which, has taken two weeks as I said.

    Not a fan.

    Thank you.

    *)

    AB

  • @arty I’m sorry you’re having so much trouble. What’s the URL for your website? I’d offer some help, but I only know a few things about getting things fixed.

    Are you using the WordPress dashboard to do the uploading of plugins? Or are you downloading them and then uploading them to your server?

  • @arty who is hosting your site? As in godaddy, hostgator, bubba’s telco or?

  • @glengorham @erikdeckers @kristi-hines

    Ok am still waiting for Google analytics to register, nothing yet which concerns me.

    I pasted the code before the closing /head tag as discussed.

    I am using ‘crazydomans’ in Australia with my own domain name.

    http://www.projectlove.com.au

  • @arty Something didn’t go right – I don’t see the analytics code when I view your source.  

  • @kristi-hines

    Can you see it now? I pasted another script before the second closing /head statement. I also checked my Google analytics and although it does not reflect the activity I know the domain has experienced, it is saying that the ‘status’ is ok and has a green tick next to the account…

    *)

  • @kristi-hines @erikdeckers

    I just clicked ‘view source’ on my webpage and had a look.

    Then I went back to WP and clicked through all of the ‘Appearance – Editor – Edit Themes’ one by one.

    None of them are like the code I see on the page including the ‘header’ theme or any other in WP.

    I don’t understand this.

    I copied and pasted the:

    <script type=”text/javascript”>

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-XXXXX-X']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
        ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl‘ : ‘http://www‘) + ‘.google-analytics.com/ga.js’;
        var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>

    Code into the ‘header’ theme before both closing /head statements as suggested.

    Something else perhaps?

  • The only other thing I can suggest is you give me access to your blog. (You can create a user account, and set me up as an admin.) I’ll look at where you can paste it and create instructions for you, but I won’t do it myself. (I don’t want to break anything.)
    We could also try GoToMeeting and you could show me your desktop and we can conference a call together. I’ll walk you through it as I see what shows up on your screen.

    If you’re willing to do that, let’s take this discussion off-list. You can reach me at erik dot deckers at gmail dot com.

  • @erikdeckers

    Thanks Erik,

    I will just wait another 24 hours and see if this thing works and then get back to you.

    *)

    AB

  • Art Bitch: You can just make a static Page your default Home on 2011 theme. Then you won’t have all the blog features which are annoying you. 


Add your voice to the discussion

Existing members: . If you do not have a SME account, .