I'm using R
with the package RSiteCatalyst
to get some information about number of visits for the last month to a set of sites:
# Extract data for job search visits
jobSearch <- QueueRanked(myReportSuiteId,
dateFrom, dateTo,
metrics = "visits",
elements = "page",
top = 10000,
search = "careers/jobsearch/jobsearch",
segment.id = segment_visits_monthly)
The result is a dataframe, whose first 5 observations are:
> dput(head(jobSearch,5))
data2 <- structure(list(name = c("/en/careers/jobsearch/jobsearch/index.html",
"/de/careers/jobsearch/jobsearch/index.html", "http://www.....com/cms/de/...",
"http://www.....com/cms/en/...",
"https://www....com/cms/..."
), url = c("http://www.....com/cms/en/...",
"http://www.....com/cms/de/...",
"http://www.....com/cms/de/...",
"http://www.....com/cms/en/...",
"https://www.....com/cms/de/..."
), visits = c(36035, 14882, 92, 64, 15), segment.id = c("...",
"...", "...", "...",
"..."), segment.name = c("Visits Monthly Reporting",
"Visits Monthly Reporting", "Visits Monthly Reporting", "Visits Monthly Reporting",
"Visits Monthly Reporting")), .Names = c("name", "url", "visits",
"segment.id", "segment.name"), row.names = c(NA, 5L), class = "data.frame")
While doublechecking the originated result from the API call with the result obtained in the Omniture frontend, I see that every page is given the correct number of visits (compare image with data2$visits
), but the totals are two different values:
> # Sum visits accross data2 observations to obtain the total
> sum(data2$visits)
[1] 51088
I'm aware of how granularity
and duplication
can sometimes be tricky. Until now, I have resolved this kind of discrepances using requests to trended or overtime reports and setting the granularity
to 'month'. However, this attribute cannot be defined while requesting ranked reports.
Question: My wish would be to obtain the total number of visits displayed in the Omniture frontend using an API call. Does someone has already faced this problem? Is there any kind of workaround?