Google Analytics Tracking My Landing Pages

Discussion in 'PHP' started by rickybuitrago, Oct 2, 2008.

  1. #1
    So I added a PHP code in my index page that randomley displays the two Landing pages Im split testing.

    This is the code:

    <?php
    if(rand(0,1) == 0) {
    header("Location: http://www.example.com/split1");
    } else {
    header("Location: http://www.example.com/split2");
    }
    ?>

    Now, I need to know how may people are entering each landing page, so I was adviced to use Google analytics, but the thing is that the my analytics statistics shows only the number of visitors to the page: /index.php not the number of visitors to /split1.html or to /split2.html.

    Do you know a way I can count the visitors to each of my landing pages? (prefereably with google analytics!

    Thanks!
     
    rickybuitrago, Oct 2, 2008 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Make sure you have the Analytics code on both split1.html and split2.html and not just on index.php
     
    joebert, Oct 2, 2008 IP
  3. rickybuitrago

    rickybuitrago Peon

    Messages:
    170
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah I made sure and I have in fact included the code in split1.html and split2.html still analytics only shows visitors as entering index.php
     
    rickybuitrago, Oct 3, 2008 IP