How to add "Campaign source" for Google Analytics into a php page

Discussion in 'PHP' started by OonaghG, Aug 6, 2010.

  1. #1
    We are planning to add a couple of new pages to our company website

    These pages will actually just hold a section of php code to redirect you to an external web page.

    We want to monitor how many people view the external pages, via our website, which should be equivalent to how many people visit the php pages on our site.

    I have got the redirect working but to simplify the reporting in Google analytics I thinkI need to be able to tag each of my referring pages withsomething like a "Campaign source" in order to be able to easily isolate the results for each page.

    As the only code you can have on a php page which refers you on elsewhere is the code to do the referring (& no extraneous blank spaces even!) I think I'm stuck

    - even if I did understand Google's help file which says, "Campaign Source is defined by the tagged page request query". What does this mean!

    Help & advice welcome
    OonaghG
     
    OonaghG, Aug 6, 2010 IP
  2. Houdas

    Houdas Well-Known Member

    Messages:
    158
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #2
    use ?utm_campaign or ?utm_source GET parameters
     
    Houdas, Aug 6, 2010 IP
  3. OonaghG

    OonaghG Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you mean instead of just having a simple URL which takes people to my redirecting page I get them to click on this instead:

    http://www.mypage.php?utm_campaign=summercampaign
    and leave the php code alone?

    Makes sense, wil try it out. Thank you :)
    OonaghG
     
    OonaghG, Aug 6, 2010 IP