Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Google Analytics for Developers

Google Analytics for Developers

Avatar for thomasbachem

thomasbachem

March 15, 2013
Tweet

More Decks by thomasbachem

Other Decks in Programming

Transcript

  1. for

  2. use  UnitedPrototype\GoogleAnalytics  as  Ga; $tracker  =  new  Ga\Tracker('UA-­‐12345678-­‐9',  'example.com'); $visitor

     =  new  Ga\Visitor(); $visitor-­‐>setIpAddress($_SERVER['REMOTE_ADDR']); $visitor-­‐>setUserAgent($_SERVER['HTTP_USER_AGENT']); $visitor-­‐>setScreenResolution('1024x768'); $session  =  new  Ga\Session(); $page  =  new  Ga\Page('/page.html'); $page-­‐>setTitle('My  Page'); $tracker-­‐>trackPageview($page,  $session,  $visitor);