Comparison (Analysis variant)
  • 8 Minutes to read
  • Dark
    Light

Comparison (Analysis variant)

  • Dark
    Light

Article summary

Comparison is one of the most important functions as it shows varying trends of different metrics and formulas.

It is possible to analyze date ranges and segments (i.e., saved groups of users, as new customers or regular customers).

Activating the Comparison and copying the configuration

  1. In an analysis, click on the Comparison symbol.

  2. Configure the Comparison. Learn more about it in the training chapter.

  3. Finish the configuration by clicking on „Apply“.

  4. Click “Copy JSON configuration”.

Example Call

{
    "resultType": "DATA_ONLY",
    "queryObject": {
        "columns": [
            {
                "name": "pages",
                "scope": "OBJECT",
                "context": "PAGE",
                "variant": "NORMAL",
                "lowerLimit": 1,
                "upperLimit": 20
            },
            {
                "name": "pages_pageImpressions",
                "columnPeriod": "ANALYSIS",
                "sortDirection": "DESCENDING",
                "sortIndex": 1, // mainly relevant in list view mode, in comparison view mode it is irrelevant given that there is a sorting section below. 
                "scope": "OBJECT",
                "context": "PAGE",
                "variant": "NORMAL"
            }
        ],
        "viewMode": {
            "active": "comparison",
            "comparison": {
                "type": "time",
                "values": {
                    "time": [
                        {
                            "name": "time_range",
                            "filterPredicate": "BETWEEN",
                            "connector": "AND",
                            "caseSensitive": false,
                            "context": "NONE",
                            "value1": "2022-09-19 00:00:00",
                            "value2": "2022-10-17 00:00:00"
                        },
                        {
                            "name": "time_range",
                            "filterPredicate": "BETWEEN",
                            "connector": "AND",
                            "caseSensitive": false,
                            "context": "NONE",
                            "value1": "2022-08-22 00:00:00",
                            "value2": "2022-09-19 00:00:00"
                        },
                        {
                            "name": "time_range",
                            "value1": "2022-07-01 00:00:00",
                            "value2": "2022-07-05 00:00:00",
                            "filterPredicate": "BETWEEN",
                            "connector": "AND",
                            "context": "NONE",
                            "caseSensitive": false
                        }
                    ],
                    "segment": []
                },
                "sorting": { // if you switched to list view mode, this section would be omitted.
                    "time": [
                        {
                            "alias": "page_impressions|0",
                            "direction": "DESCENDING"
                        }
                    ],
                    "segment": []
                }
            }
        },
        "variant": "LIST",
        "predefinedContainer": {
            "filters": [
                {
                    "name": "time_range",
                    "filterPredicate": "BETWEEN",
                    "connector": "AND",
                    "caseSensitive": false,
                    "context": "NONE",
                    "value1": "2022-09-19 00:00:00",
                    "value2": "2022-10-17 00:00:00"
                }
            ],
            "containers": []
        }
    }
}

Example Response

{
    "calculationDataType": "RAW_DATA",
    "rows": [
        [
            "en.catalogsearch.result",
            1211386,         	//-> Page Impressions time range 1 (2022-09-19 - 2022-10-17)
            1167441,			//-> Page Impressions time range 2 (2022-08-22 - 2022-09-19)
            164006,				//-> Page Impressions time range 3 (2022-07-01 - 2022-07-0)
            3.764215921832445,	//-> Page Impressions delta %  (time range 1 and  2)
            43945,				//-> Page Impressions delta absolut  (time range 1 and 2)
            638.6229772081509,	//-> Page Impressions delta %  (time range 1 and 3)
            1047380				//-> Page Impressions delta %  (time range 1 and 3)
        ],
        [
            "en.home",
            652346,
            625016,
            87226,
            4.372688059185691,
            27330,
            647.8802192006971,
            565120
        ],
         ...
        [
            "0000000000",
            8889290,
            8555025,
            1199137,
            3.9072358058567858,
            334265,
            641.3072901595064,
            7690153
        ]
    ],
    "rowCount": 21,
    "rowCountTotal": 101,
    "headers": [
        {
			"alias": "content|0",
            "arrangeType": "content",
            "sumPositions": [
                20
            ],
            "name": "pages",
            "metric": false,
            "dimension": true
        },
        {
            "alias": "page_impressions|0",  //-> Page Impressions time range 1 (2022-09-19 - 2022-10-17)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false,
            "sortIndex": 1,
            "sortDirection": "DESCENDING"
        },
        {
            "alias": "page_impressions|1", //-> Page Impressions time range 2 (2022-08-22 - 2022-09-19)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|2", //-> Page Impressions time range 3 (2022-07-01 - 2022-07-0)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|3", //-> Page Impressions delta %  (time range 1 and  2)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|4", //-> Page Impressions delta absolut  (time range 1 and 2)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|5", //-> Page Impressions delta %  (time range 1 and 3)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        },
        {
            "alias": "page_impressions|6", //-> Page Impressions delta %  (time range 1 and 3)
            "arrangeType": "page_impressions",
            "name": "pages_pageImpressions",
            "metric": true,
            "dimension": false
        }
    ],
    "columnCount": 8,
    "information": [],
    "warnings": [],
    "timerange": [
        "2022-07-01T00:00:00.000+0200",
        "2022-10-17T00:00:00.000+0200"
    ],
    "timestamp": "2022-10-17T11:08:47.369+0200"
}


Was this article helpful?