Total is different from the sum API | Community
Skip to main content
February 24, 2022
Solved

Total is different from the sum API

  • February 24, 2022
  • 2 replies
  • 1673 views

I am having troubles understanding how Adobe Analytics calculates the totals. I used the API debugger to copy the request. When I sum the response values I get a different (higher) sum from the one in total . I am looking at the metric visits and dimensions daterange .... Any ideas ? 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by vidurb80577666

@user04080,

As I can see the dimension being used is "Page" and applied metric filters like "Day" and "referrer type".

There could be a possibility that a single visit has more than 1 page and all the pages had the same referrer type as it is based on visit container. In report all the pages would be available as separate line item and would be having 1 visit against all the page and referrer type but in total it is actually one visit.

 For 1 visitor 1 visit, report would be like:
Page         |       Visit(Day and referrer type)
-------------------------------------------------------------
Page A     |           1 (Feb. 1st, Search Engine)
Page B      |          1 (Feb. 1st, Search Engine)
--------------------------------------------------------------
Total        |             1

 

2 replies

Adobe Employee
February 24, 2022

@user04080 ,

This is happening because of deduplication.

Suppose a visitor started the journey on the site at 11:55pm (Feb. 1st) made 5 hits and ended the visit at 12:05am(Feb. 2nd) next day. 
The data in API/workbook would look like:
Day        |          Visit
------------------------------
Feb. 1    |              1
Feb. 2    |              1
-----------------------------
Total        |             1
If you do the sum of individual line items it will be 2 but due to de-duplication total here would be 1 as the visit made by the user was only 1.
Hope this helps.
user04080Author
February 24, 2022

Thanks for your answer. I am actually requesting the data for the same date. Here is my request 

{
	"rsid": "xxxxx",
	"globalFilters": [
		{
			"type": "dateRange",
			"dateRange": "2022-02-01T00:00:00.000/2022-02-02T00:00:00.000"
		}
	],
	"metricContainer": {
		"metrics": [
			{
				"columnId": "0",
				"id": "metrics/visits",
				"filters": [
					"0",
					"1"
				]
			}
		],
		"metricFilters": [
			{
				"id": "0",
				"type": "breakdown",
				"dimension": "variables/daterangeday",
				"itemId": "1220101"
			},
			{
				"id": "1",
				"type": "breakdown",
				"dimension": "variables/referrertype",
				"itemId": "3"
			}
		]
	},
	"dimension": "variables/page",
	"settings": {
		"countRepeatInstances": true,
		"limit": 50000,
		"page": 0,
		"nonesBehavior": "return-nones"
	}
}

Not sure why I would have de-duplication if it's for the same date.

vidurb80577666Adobe EmployeeAccepted solution
Adobe Employee
February 24, 2022

@user04080,

As I can see the dimension being used is "Page" and applied metric filters like "Day" and "referrer type".

There could be a possibility that a single visit has more than 1 page and all the pages had the same referrer type as it is based on visit container. In report all the pages would be available as separate line item and would be having 1 visit against all the page and referrer type but in total it is actually one visit.

 For 1 visitor 1 visit, report would be like:
Page         |       Visit(Day and referrer type)
-------------------------------------------------------------
Page A     |           1 (Feb. 1st, Search Engine)
Page B      |          1 (Feb. 1st, Search Engine)
--------------------------------------------------------------
Total        |             1

 

user04080Author
February 24, 2022

Makes sense ! Thank you