#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0

    Google analytics PHP Implementation


    My index file is in the root and all supporting files are in a sub directory named HTML. The code I have in my index page is...

    PHP Code:
    <?php include_once("HTML/analyticstracking.php"?>
    and it works fine. But I cannot get it to work on any of the supporting pages. The pages are in the same HTML directory as the analyticstracking.php file. I am using the following code..

    PHP Code:
    <?php include_once("analyticstracking.php"?>
    I have tried including this line in the header and the body without success. I originally thought something was wrong with my PHP code. But now i'm starting to wonder if I have google analytics setup correctly. On the main page code page, I have all 4 addirional tracking settings off. But it should still be tracking all pages with tracking code under my main domain. Can anyone help me with this. Thanks.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2014
    Posts
    15
    Rep Power
    0
    Your supporting pages are in .html please conver that pages to .php
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,616
    Rep Power
    595
    Why are you replying to year old threads?
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  6. #4
  7. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6352
    Because he's a spammer who is very bad at his job. I'm watching him.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo