Sitecore 10.1 – Path Analyzer goal maps do not contain any data

For one of our clients we noticed that when we create new Goal Maps for the Path Analyzer no data was returned and the following message is shown in the Path Analyzer:

“No data was found for the selected map in the selected date range.
Please try selecting a different map or changing the date range.”

I’ve tried redeploying the map, and even ran the Historic Map Rebuild on the /sitecore/admin/pathanalyzer.aspx page, however this would not solve the issue. All other map types did not seem to have this problem, only the Goal Maps.

After concluding that it did not work and seeing it work in previous versions of Sitecore, i’ve started doing some digging. All data for the Path Analyzer maps is stored in the Reporting database. The TreeDefinition table contains all the data required to build the tree with the options we configured within our goal map. This data is used by the Sitecore.PathAnalyzer.Construction.TreeBuilder class.

A sample TreeDefinition record for one of our goal maps in Sitecore 10.1 is as follows:

{
    "$type": "Sitecore.PathAnalyzer.Data.Models.TreeDefinition, Sitecore.PathAnalyzer",
    "BuilderType": "Sitecore.PathAnalyzer.Construction.PageTreeBuilder,Sitecore.PathAnalyzer",
    "Id": "11efce5e-966b-4f02-b85c-ccd2ad8e16eb",
    "Revision": "3aca198c-833c-4300-9de6-29556c5b1cf8",
    "Rules": "<ruleset><rule uid='CFA86596A53540438C6C82DB8EF14142'><conditions><condition id=\"{FE4C1ED4-8835-4EAF-AECC-37BDC7AF292D}\" uid=\"939BAAAD93BD451DB7AA673B7812AE1C\" /></conditions><actions><action id='{F0FDE44B-B200-416C-A048-C833D4106CA6}' uid='28DCDD9CAD0C4705B5C17BA0BFAE2FD6' /></actions></rule></ruleset>",
    "DeployDate": "2021-09-24T09:28:45.6856369Z",
    "Status": 0,
    "TaskId": "00000000-0000-0000-0000-000000000000",
    "Options": {
        "$type": "System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]], mscorlib",
        "{95527FD0-818C-4045-802A-10A27EAAFABE}": "{66722F52-2D13-4DCC-90FC-EA7117CF2298}",
        "{A41C1159-F6D5-4721-A39C-D620E5EF689D}": ""
    }
}

A sample TreeDefinition record for one of our goal maps in Sitecore 10.0 is as follows:

{
    "$type": "Sitecore.PathAnalyzer.Data.Models.TreeDefinition, Sitecore.PathAnalyzer",
    "BuilderType": "Sitecore.PathAnalyzer.Construction.PageTreeBuilder,Sitecore.PathAnalyzer",
    "Id": "11efce5e-966b-4f02-b85c-ccd2ad8e16eb",
    "Revision": "3aca198c-833c-4300-9de6-29556c5b1cf8",
    "Rules": "<ruleset><rule uid='CFA86596A53540438C6C82DB8EF14142'><conditions><condition id=\"{FE4C1ED4-8835-4EAF-AECC-37BDC7AF292D}\" uid=\"939BAAAD93BD451DB7AA673B7812AE1C\" /></conditions><actions><action id='{F0FDE44B-B200-416C-A048-C833D4106CA6}' uid='28DCDD9CAD0C4705B5C17BA0BFAE2FD6' /></actions></rule></ruleset>",
    "DeployDate": "2021-09-24T09:28:45.6856369Z",
    "Status": 0,
    "TaskId": "00000000-0000-0000-0000-000000000000",
    "Options": {
        "$type": "System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]], mscorlib",
        "{95527FD0-818C-4045-802A-10A27EAAFABE}": "{66722F52-2D13-4DCC-90FC-EA7117CF2298}",
        "{A41C1159-F6D5-4721-A39C-D620E5EF689D}": "",
        "target": "66722f52-2d13-4dcc-90fc-ea7117cf2298"
    }
}

When we compare both records, we see that the target property within the options propery is missing in Sitecore 10.1 The target property is used by the rule that is used to determine if an interaction has a specific goal. In terms of the Goal Map, the target property contains the ID of the goal that is configured for the Goal Map.

Because this property is missing, the rule that is used to determine if an interaction contains a specific goal event will always return false. This will eventually lead to skipping all interactions, and thus not having any data in the map.

How to fix it

Manual fix (required every time that a new Goal Map is deployed)
For the maps affected, run the following query on your reporting database (replace MAPID with the GUID of your Goal Map). After ~ 30 minutes a rebuild of the maps will start, and the correct definition should be deployed to the TreeDefinitions table.

delete FROM [dbo].[Trees] where DefinitionId = 'MAPID';
delete FROM [dbo].[TreeDefinitions] where DefinitionId = 'MAPID';

-- If you want to force history processing for your plans (otherwise they will start collecting data from now on), uncomment the lines below
-- delete FROM [dbo].[Trail_PathAnalyzer];
-- delete FROM [dbo].[Trail_Interactions];

The Trail_Interactions table contains a record for every interaction that is already processed.
The Trail_PathAnalyzer should include a hashed value that consists out of the interactionid combined with the aggregationmode (Live or Historic).
By emptying both tables all interactions will be processed again.

Proper fix
If you are not to keen on doing this every time a marketeer creates a new map, ask Sitecore for the hotfix for 501157. They will supply you with a new Sitecore.PathAnalyzer.dll to fix it.

Public reference: 501157, broken in 10.1.0, 10.1.1, 10.1.2, (expected to be) fixed in 10.1.3 or 10.2.1

Leave a Reply

Your email address will not be published.