Google Analytics

Questions and answers about change of functions, design, hosting etc.

Moderators: Koduc, Xpycm

Forum rules
Pay attention! Forum is not a means for guaranteed support of clients and users. An answer as well as a quick answer is not supposed on the forum. We post messages as soon as possible.

The message limit on the forum is 3 messages per day.
If you want to say "thank you" then use the function "Give good reputation point", which is a green icon "plus" under the nickname of the person, who answered the message.

Google Analytics

Postby geeman » 25 Mar 2014, 14:39

Hello, i want to use Google Webmaster Tools and Google Analytics with the site, they provide me with a code i need to enter into each page of my website in order for the stats to become available.

The script they give me is:

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-48706323-2', 'bankrepossessionsinspain.co.uk');
ga('send', 'pageview');

</script>

How can i incorporate this into the pages?

Many thanks for all your support

Gino
geeman
Stranger
 
Posts: 13
Joined: 12 Mar 2014, 21:43
Reputation point: 0

Re: Google Analytics

Postby Xpycm » 25 Mar 2014, 15:51

Dropbox
Open Real Estate CMS: FAQ | FAQ 2 | FAQ 3
Image
Xpycm
Web Developer
Web Developer
 
Posts: 281
Joined: 30 Dec 2011, 11:06
Reputation point: 2

Re: Google Analytics

Postby geeman » 25 Mar 2014, 16:58

Can i just copy the Google Analytic code in between the entry you mention?

For example:

<div class="footer">
<?php echo getGA(); ?>
<p class="slogan">&copy;&nbsp;<?php echo CHtml::encode(Yii::app()->name).', '.date('Y'); ?></p>
<!-- <?php echo param('version_name').' '.param('version'); ?> -->

<div align="center">
<!-- <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-48706323-2', 'bankrepossessionsinspain.co.uk');
ga('send', 'pageview');

</script> -->
</div>
</div
geeman
Stranger
 
Posts: 13
Joined: 12 Mar 2014, 21:43
Reputation point: 0

Re: Google Analytics

Postby Xpycm » 25 Mar 2014, 17:50

Of course or before closing body tag
Dropbox
Open Real Estate CMS: FAQ | FAQ 2 | FAQ 3
Image
Xpycm
Web Developer
Web Developer
 
Posts: 281
Joined: 30 Dec 2011, 11:06
Reputation point: 2


Return to Questions and help for changes

Who is online

Users browsing this forum: No registered users and 2 guests

cron