Skip to main content Help Control Panel

 

English «   Need Help «  

Adding Google Analytics

Boen, Jan -- on Mar. 11 2010

Is there a way to add Google analytics to all pages.

WorkflowSupport request
StatusProblem has been recorded
OwnerBoen, Jan
Progress0%

This is the script I would like to add.

<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-15066440-1");
pageTracker._trackPageview();
} catch(err) {}</script>


How can this be done?

Thanks,

Jan

Comments


Boen, Jan
131 posts

on Mar. 11 2010


Issue has been created

Alexis Raimbaultfrom Mulhouse
Associate, 1898 posts

on Mar. 11 2010


Hello Jan,

You can add this in control panel, building of pages. there's a edit field to add some script to all pages.

Another solution is to include your script inside your template.php, but first solution is easiest.




Alexis Raimbault webmaster free-lance

Boen, Jan
131 posts

inspired from Alexis Raimbault on Mar. 11 2010


Alexis Raimbault:

Hello what is the correct English menu name?

I can't find a control panel option with this feature.

 

Jan


Alexis Raimbaultfrom Mulhouse
Associate, 1898 posts

inspired from Boen, Jan on Mar. 11 2010


Boen, Jan : it's the page where you can configure site name, site slogan, site description etc.

At the bottom, you have "trailer" field and this hint :

"Additional text inserted at the very end of every web page generated by YACS. Use this to integrate page tracking systems, with adequate <script> tags."

you can also access this page via url /skins/configure.php




Alexis Raimbault webmaster free-lance

J.Juraverfrom Entre chaise et clavier...
3710 posts

on Mar. 11 2010


One more info : in your google-analytics panel, you should create a filter in the parameters section, wich disable your own IP tracking.

If not done, GG analytics will registrer some visited pages as purge.php and any administration action done as you are authenticated in your yacs site...




Je ne m'attarde pas, j'ai mon yacs en double file...

Yacs on my blog | Suivez le blog Yacs | Yacs Showroom | Plugin Firefox de recherche dans Yetanoz |

Bernard Paquesfrom nearby-an-airport
Associate, 8363 posts

on Mar. 12 2010


If I remember correctly, yacs provides native support for Urchin, which is the previous name for Google Analytics. All you have to do is to enter the id to use in the configuration panel for services. This will set the global parameter google_urchin_account and yacs will do the rest. If this is still working, then it would be better to use this feature. Else, if this way to invoke Google Analytics has been obsoleted, we should remove related code. Thanks for your feed-back on this!


J.Juraverfrom Entre chaise et clavier...
3710 posts

inspired from Bernard Paques on Mar. 12 2010


Bernard Paques : old urchin is obsoleted. See french topic here Google analytics




Je ne m'attarde pas, j'ai mon yacs en double file...

Yacs on my blog | Suivez le blog Yacs | Yacs Showroom | Plugin Firefox de recherche dans Yetanoz |

Boen, Jan
131 posts

on Mar. 12 2010


The Google Analytics script doesn't work.

Suggestions?


Alexis Raimbaultfrom Mulhouse
Associate, 1898 posts

inspired from Boen, Jan on Mar. 12 2010


Boen, Jan : your have to wait one day for first stats. Is it better today.

Display the html source of one page to check if tracker is here.




Alexis Raimbault webmaster free-lance