Adding Google Analytic Print E-mail
Written by Joachim   
Thursday, 04 June 2009 15:55

Google Analytic let you see detailed statistic about visitors to your website, this will help you optimize your website by watching what actions you make give you the most visitors. These actions can be running different advertising campaign, doing some search engine optimization or just promoting your website to other people and websites. This guide shows you how to enable Google Analytic on your website.

  1. First you will need a Google Analytic account, go to http://www.google.com/analytics and sign up for your free account. Once you have registered and have your credentials, log in to Google Analytic.

  2. Once you are inside, choose "Add Website profile". In the create new website profile page, choose to add a new domain. In the URL box ype in the address of your Satellite Gamesite System site, press continue. in the next page you will get your own tracking code you need to insert into the code of your gamesite. Select the code with your mouse and copy it by right clicking and select copy. Press Finish.

  3. Connect to your gamesite by using a FTP program like FileZilla. You need to insert your Google Analytic code to the template you have choosen for your gamesite, we'll use the Wanda template as an example in this guide. When you are in your gamesite root folder, browse to /templates/wanda/. Use your ftp program to edit the file page.html, this is usually done by right clicking and selecting "view/edit". When you are edting this file, you need to browse to the bottom and insert your Google Analytic code before </body>. Below is an example of how the bottom part of page.hml will look after you have entered the Google Analytic code. The Google Analytic code you need to insert is in red.

			{DISCLAIMER}
<p>
{POWEREDBY}
<br />
{RENDERTIME} | {MEMORYUSAGE}
</p>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-1551044-16");
pageTracker._trackPageview();
} catch(err) {}</script>

</body>
</html>


When you have saved and uploaded the edited page.html, open the profile settings of your gamesite. Here you can click
Check Status to force a check for you code. If everything is in order, your tracking status on the next page should display Analytics has been successfully installed and data is being gathered now. This means the code has been inserted correctly and it is collecting data.

If you are using the Online games modules, you will also need to add these changes to the "page_play.html" file. This page is where the users play the different online games, and it is seperate from the "page.html" file.
{DISCLAIMER}
<p>
{POWEREDBY}
<br />
{RENDERTIME} | {MEMORYUSAGE}
</p>
</div>
</div>

Comments (7)Add Comment
...
written by GameSocket, June 26, 2009
Thank you for this. Analytics added and also adsense up top.
...
written by GameSocket, June 29, 2009
Just as a side not for this, any changes to your SGS like custom logo or tracking. If you have play online games enabled you may want to also do any edits to page_play.html.
Thanks for this article it got me started on modifying my SGS.
...
written by Joachim, July 01, 2009
For google analytic, adding this code to your page.html will make it analyze all the pages, including the online games page.
...
written by MacMajor, July 05, 2009
GameSocket, You mentioned:
If you have play online games enabled


Where would enable this?

Joachim, Thanks for the article! I'm on it now!! smilies/smiley.gif

Tracy
...
written by GameSocket, July 05, 2009
Tracy,
Login to SGS admin area>>Modules>> then on the right side it has a options menu>>click module layout(it is cleverly hidden). IN the Area tab, select side bar, and what you can add or remove is there. In where it has your website preview up can move the block to where you want it.
...
written by Joachim, July 06, 2009
Hi, I though page_play.html was for the overall online games page, I was wrong. It seems the page_play.html is the "play" page for the online games, and it doesn't use the page.html page. I have added an alert about this at the bottom. Thanks for the heads up GameSocket.
...
written by GameSocket, July 07, 2009
smilies/cheesy.gif ..no worries. I saw your previous post but didn't want to argue. smilies/tongue.gif

Cheers

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.
busy
Last Updated on Friday, 12 February 2010 21:33