gaRequest(
id=c('ga:123456789','ga:987654321'),
dimensions='ga:date,ga:month',
metrics='ga:sessions,ga:users,ga:pageviews',
start='YYYY-MM-DD',
end='YYYY-MM-DDD',
sort='-ga:sessions,ga:users',
max='1000',
filters='ga:browser==VALUE,ga:city==VALUE',
segment='abcdef',
allResults=FALSE,
token='abcdef'
)
Run the code above in your browser using DataLab