Adobe Analytics API request for ranked report using RSiteCatalyst package. Totals doesn't correspond to what I see in the Dashboard frontend
Asked Answered
C

1

6

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:

enter image description here

> # 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?

Conveyor answered 27/4, 2016 at 9:40 Comment(0)
K
3

Some possibilities come to mind:

  1. 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.

  2. 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.

Kandi answered 10/5, 2016 at 17:48 Comment(1)
Although your response doesn't solves my problem (I have never get "accountsummary" to work), there is a obvious conclusion from it. I'm aware that we never should mix page dimensions with session metrics (or viceversa), but the client is used to it. As web analyst it's also our responsability to educate the clients in best practices... although is never easy. Meanwhile, I will keep updating this KPI manually :(Conveyor

© 2022 - 2024 — McMap. All rights reserved.