Not signed in (Sign In)


Register here to join the discussions.

    • CommentAuthorwebfusion
    • CommentTimeFeb 10th 2010
     
    Hi

    I am having problems tracking my web pages that have the comments script on them, I want to track them with google analytics.

    I have found that pages without the comments script are tracked but the ones with it aren't.

    It has something to with this: <?php include_once("analyticstracking.php") ?>

    Does this command conflict with the comments script?

    Thanks for any help.
    • CommentAuthorAvram
    • CommentTimeFeb 11th 2010
     
    Staff
    That is standard PHP include function (include once) and it is not in conflict with our script, but contents of your "analyticstracking.php" file might be. As I don't know what's inside your file I can not tell you anything about it, but standard (official) JavaScript tracking code for Google Analytics should not be in conflict with our script.
    • CommentAuthorwebfusion
    • CommentTimeFeb 12th 2010
     
    Thanks for your reply, this is the contents of the tracking script:

    <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("my account id here");
    pageTracker._trackPageview();
    } catch(err) {}</script>

    Just thinking about it I also use a ratings script on the same page as the comments script, the ratings script uses a sql lite database:

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">google.load("jquery", "1.3.2");</script>
    <script type="text/javascript" src="rating/rating.js"></script>
    <?php include('../rating/rating.php'); ?>

    Well not sure if any of this helps, maybe I should try removing that first and see if I can get the tracking script to work.

    Thanks