Google analytics/ asynchronous snippet

Permalink
where is the Analytics Settings? i cant find it anywhere and i need to figure out how to get google to track my things and cant find any info for dummys to put the code in and get it to work... step by step directions are what im looking for..

 
EmeraldStar replied on at Permalink Reply
EmeraldStar
1.) Step One: Go to Google Analytics and sign up for an account:

http://www.google.com/analytics/...

2.) Once you activate your account, they will give you the code to put in your site. Copy it.

3.) Go back to the file manager for your site and find your header.php file. For me it was located under: Public_html > Concrete > Themes > Default > Elements > Header.php

4.) Open the Header file and right before the last DIV tag insert/paste your code. Save it. Voila!

Wait a day and then log into your Google Analytics account to check the information. Hope this helps!
-Elizabeth
lurday replied on at Permalink Reply
I follow your instruction but I was not able to connect the analytics and the site. I wonder if this is the path Public_html > Concrete > Themes > Default > Elements > Header.php

<?php defined('C5_EXECUTE') or die("Access Denied."); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="<?php echo LANGUAGE?>" xmlns="http://www.w3.org/1999/xhtml">
<head>

<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('typography.css')?>" />

<?php Loader::element('header_required'); ?>

</head>
<body>

<div id="page">
<div id="headerSpacer"></div>
<div id="header">

<?php if ($c->isEditMode()) { ?>
<div style="min-height: 80px">
<?php } ?>

<div id="headerNav">
<?php
$a = new Area('Header Nav');
$a->display($c);
?>
</div>

<h1 id="logo"><!--
--><a href="<?php echo DIR_REL?>/"><?php
$block = Block::getByName('My_Site_Name');
if( $block && $block->bID ) $block->display();
else echo SITE;
?></a><!--
--></h1>

<?php
// we use the "is edit mode" check because, in edit mode, the bottom of the area overlaps the item below it, because
// we're using absolute positioning. So in edit mode we add a bit of space so everything looks nice.
?>

<div class="spacer"></div>

<?php if ($c->isEditMode()) { ?>
</div>
<?php } ?>

<div id="header-area">
<div class="divider"></div>
<div id="header-area-inside">
<?php
$ah = new Area('Header');
$ah->display($c);
?>
</div>

<?php if ($ah->getTotalBlocksInArea() > 0) { ?>
<div class="divider"></div>
<?php } ?>
</div>
<meta name="google-site-verification" content="yuNBDUXFPzQcja8eO5xM3S3qoiiEZT82szrTRyTAOmY" />
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29013533-1']);
_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>
</div>
Phallanx replied on at Permalink Reply 1 Attachment
Phallanx
You don't need to edit any files to add you GA code.
For C5.5
Go to your dashboard>system&settings
Select "Tracking Codes" under "SEO and Statistics"
Paste your GA code into the text area (see attachment)