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?
Some possibilities come to mind:
Less likely - Adobe Analytics frontend is providing total amount of visits for all pages. In the API request you're limiting the report to top 10K pages. This might be a potential source of trouble.
Most likely - It seems to be a matter of duplication. Since you're adding up visits by yourself in the R console by using sum(data2$visits)
, that's most likely the source of duplicated visits. When Adobe Analytics performs the calculation in the frontend, it will automatically remove duplicates.
So, in order to get the total visits I would create a segment that would include only pages that match your criteria URL contains "careers/jobsearch/jobsearch"
. Then, I would apply that segment to a query by using the 'accountsummary' report in tandem with your newly created segment:
QueueRanked("YourReportSuite",
date.from = '2016-05-01',
date.to = '2016-05-01',
elements = "accountsummary",
segment.id = "YourNewSegment"
metrics = c('visits'))
For some reason the 'accountsummary' report is dropping an empty dataframe on my side. But in any case, the main take away is that I wouldn't try to obtain visits per page and total visits within the same Adobe Analytics report through the API.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With