I need get pageviews, country code and devicetyp of a set of URL’s .
I’m testing different method of the API but I’m anoyed with results.
First: I use method UserCountry.getCountry to konw where the visits are from. Using the segment pageUrl.
Second: For each country of the first step I use method DevicesDetection.getType to get visits per device type. Using the segmente countryCode and pageUrl.
Finally: I loop between devicetypes and I make request to method Actions.getPageUrl using the segments deviceType, countryCode and using pageUrl parameter.
The problem with this method is that while in second step I had 2 visits from desktop and 7 from smartphone, when I made the request in the last step using segments ther request for some devicetypes and acountrycode is empty. How is possible?
I can’t believe this is the best way to get this data, I find it very difficult. To get the same info en Google Analytics you only have to select a metric and two dimensions. Thats all.
Can you help me to find the best way to get this information?