Jump to:

10389 Posts in 2200 Topics by 1712 members

All other Modules

SilverStripe Forums » All other Modules » Google Analytics Module installed successfully but all I get is waiting for data???

Discuss all other Modules here.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1303 Views
  • TF-35Lightning
    Avatar
    Community Member
    137 Posts

    Google Analytics Module installed successfully but all I get is waiting for data??? Link to this post

    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 + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("UA-8888888-8");
    pageTracker._trackPageview();
    } 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");
    pageTracker._trackPageview();
    </script>

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

    <script src='http://www.google-analytics.com/ga.js' type='text/javascript'></script>
    </head>

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

    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.

  • Anonymous user
    Avatar
    Community Member
    1 Post

    Re: Google Analytics Module installed successfully but all I get is waiting for data??? Link to this post

    Hi there. I've made some updates to googleanalytics and the trunk version should work with 2.4.

    Please make sure that you are seeing the "var pageTracker = _gat._getTracker(...);" line appearing in the source code of your pages (on the front-end), and that google's 'ga.js' file is included.

    Please update, and let me know if there are still issues.

    Cheers,
    - Luke

  • xeraa
    Avatar
    Google Summer of Code Hacker
    58 Posts

    Re: Google Analytics Module installed successfully but all I get is waiting for data??? Link to this post

    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

  • wysow
    Avatar
    Community Member
    1 Post

    Re: Google Analytics Module installed successfully but all I get is waiting for data??? Link to this post

    Hello,

    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.

    Thanks

  • xeraa
    Avatar
    Google Summer of Code Hacker
    58 Posts
    1303 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.