Send Analytics to Sitecore rendering not working
Send Analytics to Sitecore rendering not working
Symptoms
When using the Send Analytics to Sitecore
rendering in a Coveo-powered search page, you get the following error message on a searchFromLink
event:
Server Error in '/' Application.
Precondition failed: The parameter 'p_EventData' must not be null
Parameter name: p_EventData
Description: An unhandled exception occurred.
Exception Details: System.ArgumentNullException: Precondition failed: The parameter 'p_EventData' must not be null
Parameter name: p_EventData
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentNullException: Precondition failed: The parameter 'p_EventData' must not be null
Parameter name: p_EventData]
Coveo.Framework.CNL.Precondition.NotNull(Object p_Parameter, String p_ParameterName) +181
Coveo.Framework.CNL.Precondition.NotNull(Object p_Parameter, Func`1 p_ParameterExpression) +27
Coveo.Analytics.Events.SqlEventTracker.Track(PageEventData p_EventData) +162
Coveo.Analytics.xDB.Processors.HandleSitecoreSearchEventProcessor.Process(CoveoAnalyticsPipelineArgs p_Args) +333
Cause
A Coveo.Analytics.xDB.config
patch command isn’t applied because configuration files aren’t loaded in the proper order.
Resolution
The issue has been corrected in the February 2019 version of Coveo for Sitecore 5 by moving the Coveo.Analytics.xDB.config
file into a new Analytics
sub-folder.
Workaround
If you don’t want to upgrade to the February 2019 version of Coveo for Sitecore 5 right now, you can perform the following steps to have the Coveo.Analytics.xDB.config
file load at the right moment in the configuration file loading sequence:
-
In a file explorer window, open the
<SITECORE_INSTANCE_ROOT>\App_Config\Modules\Coveo
folder. -
Create a sub-folder called
Analytics
. It must be calledAnalytics
exactly to avoid issues during a future upgrade. -
Select and cut the following files from the
<SITECORE_INSTANCE_ROOT>\App_Config\Modules\Coveo
folder:-
Coveo.Analytics.XConnect.config.disabled
-
Coveo.Analytics.xDB.config
-
-
Paste the files in the
<SITECORE_INSTANCE_ROOT>\App_Config\Modules\Coveo\Analytics
folder.