PHP Script to connect to Google Analytics API with certain variables

Job ID: 33609163

Budget: €8 – €30 EUR

Quick intro:
I have one google analytics account, under which I analyse data for multiple platforms of my clients. All clients use the same Google Analytics account, but their views and unique visits are counted by at the same time sending a specific clientID (called for example for a client of the 3377: var GA_ACTION_PAYLOAD_ID = 3377;). I now need a PHP script that returns the views and unique visits for a specific timeframe and for a specific client.


I need a PHP script, that:
1) connects to the latest Google Analytics API
2) has defined variables that determine a (a) startdate and an (b) enddate
3) has defined a variable that allows me to determine a "payload_ID" parameter (p) to identify a certain client (example: var GA_ACTION_PAYLOAD_ID = 3377;)
4) gets from Google Analytics the (x) pageviews and (y) unique visits for the given timeframe (a)-to-(b), for all the pageviews that also have received this payload_ID parameter (p)
Related categories: PHP Google Analytics