Google Analytics help

Permalink
Hi,
I'm quite new to concrete5 (and basically anything which is not static html) so I'd like to get some help with google analytics and SEO in general
First of all, where do I put google analytics code? I've created a custom theme, so I've got a default.php in the themes/*theme* folder. Do I copy-paste code into that, or into index.php in root?

Secondly, how the different page are treated in terms of SEO? Are they similar to static html when it comes to a robot crawling my website?

Thanks a bunch for the help folks, and keep up the good work, C5 rocks!

 
ScottC replied on at Permalink Reply
ScottC
and put your javascript in that code and share the footer, or if you want i guess you could make an analytics.php and just include that which would only insert the javascript if for some reason you don't want to put the footer in every page.

If you only have one pagetype (100% width, or every page looks the same) then you could go ahead and put it in the footer or bottom of the page area on the default.php page.

In the new themes the footer is "abstracted out" for lack of a better term regardless of the makeup or layout of the main body or meat of the page.
HSA replied on at Permalink Reply
because I've got only one pagetype.

Thanks for the reply ScottC.

unfortunately i don't know too much about this, so could you please explain how this footer.php works exactly?
ScottC replied on at Permalink Reply
ScottC
I am going to use the default theme located below as an example. DO NOT EDIT THIS unless you know what you are doing :). Do all mirrored edits on your uploaded theme that is located at siteroot/themes/yourtheme

If you open this folder siteroot/concrete/themes/default/default.php you will see
<?php  $this->inc('elements/footer.php'); ?>

This basically includes the php script located in the elements/footer.php which contains the following code:

<?php  defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
   <div id="footer">
         &copy; <?php echo date('Y')?> <a href="<?php echo DIR_REL?>/"><?php echo SITE?></a>.
         &nbsp;&nbsp;
         <?php echo t('All rights reserved.')?>   
         <span class="sign-in"><a href="<?php echo $this->url('/login')?>"><?php echo t('Sign In to Edit this Site')?></a></span>
   </div>
</div>
</body>
</html>


That basically brings up the rear of your html document (I'd do it differently) and right after the span or in another div name analytics or something like that you could drop the code in that part of your theme, NOT THE CORE.

Apparently I was mistaken in regard to default page types and inhertance from those for themes so I have to take a look at it.
frz replied on at Permalink Reply
frz
No dont touch index.php!

Put it in your default theme and it should show up on every page that matters.

as long as you can navigate to every page you want google to find, it should do fine.

there is a script you can run to generate a sitemap.xml file that google will look at, although I'm not convinced it matters for a small site.

you should also type "webmaster tools" into googls and check that stuff out. if you put an empty file with the proper name in your root directory (next to index.php) google will recognize that you actually own this site and will tell you when it indexes it and whatnot.. kinda nice.
HSA replied on at Permalink Reply
hopefully i'll be able to do it from here...

webmaster tools is great, i use it on static html sites, but thanks for the tip anyway!