Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Google Analytics Module installed successfully but all I get is waiting for data???

Go to End

4 Posts   1713 Views


Community Member, 137 Posts

23 April 2010 at 2:32pm

Hi all,

I have installed the google analytics module from silversluke but all I get from the google analytics control panel is:

Waiting for Data
Analytics has been successfully installed and data is being gathered now. ( I have waited a week but all I get is the little time icon and this message)

When I click on check status it shows me the code that I need to paste into the pages. Paste this code on your site:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8888888-8");
} catch(err) {}</script>

So I pasted the above into your Google Analytics tab back in the SS admin and clicked save.
Paste Google's code below to collect statistics for this site Analytics Tracking etc.

I also notice that when I reload the page the above code turns into:
<script type='text/javascript'>
var pageTracker = _gat._getTracker("UA-3473533-7");

Finally here is what my code looks like on the actual live website pages, any google related code:

<script src='' type='text/javascript'></script>

script type="text/javascript">//<![CDATA[
<script type='text/javascript'>var pageTracker = _gat._getTracker("UA-8888888-8");

Just wondering if someone might have some ideas on what I am doing wrong, or what is going wrong.

Desperate to get this going, any help would be great. I'm on SS 2.4 btw.


Community Member, 58 Posts

12 May 2010 at 10:14am

Edited: 12/05/2010 10:14am

1) With allow_call_time_pass_reference disabled I get the warning

Warning: Call-time pass-by-reference has been deprecated in ...\googleanalytics\code\AnalyticsSetupDecorator.php  on line 38

I assume I can savely remove the & in
if (preg_match($pattern, $script, &$matches)) {

2) On the /admin/reports/ -> "Google Analytics" the links "View Google Analytics" and "Setup Google Analytics" do not work as the JS referenced in the onclick event is not loaded (from googleanalytics/code/AnalyticsReport.php line 36 to 45).

Using both Silverstripe and GoogleAnalytics trunk


Community Member, 1 Post

16 May 2010 at 12:07am


Like xeraa the 2 javascript functions are not loaded in the admin section of google analytics module so I can't put my code to track my visitors.

Any help would be appreciated.



Community Member, 58 Posts

21 May 2010 at 11:04pm