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!
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!
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?
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?
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
This basically includes the php script located in the elements/footer.php which contains the following code:
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.
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"> © <?php echo date('Y')?> <a href="<?php echo DIR_REL?>/"><?php echo SITE?></a>. <?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.
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.
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.
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!
webmaster tools is great, i use it on static html sites, but thanks for the tip anyway!
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.