We are trying to track click event in Experience profile in Activity
tab of contact when we click on EXM campaign email link on CM role and standalone role. However, it is not tracking click event every time.
Update: Getting the below error in log file.
ManagedPoolThread #0 16:56:10 ERROR Updating campaign data statistics failed for message: 9u7y69b4-jdh3-4877-8411-9513273ca3b1
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters)
at Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.Xdb.Reporting.Datasources.Remote.RemoteReportDataSourceProxy.GetData(ReportDataQuery query)
at Sitecore.Xdb.Reporting.ReportDataProvider.ExecuteQueryWithCache(ReportDataQuery query, ReportDataSource dataSource, CachingPolicy cachingPolicy)
at Sitecore.Xdb.Reporting.ReportDataProvider.GetData(String dataSourceName, ReportDataQuery query, CachingPolicy cachingPolicy)
at Sitecore.ExperienceAnalytics.Api.ReportDataService.ExecuteQuery(IReportQueryData queryData, CachingPolicy cachingPolicy)
at Sitecore.ExperienceAnalytics.Api.ReportingService.RunQuery(ReportQuery reportQuery)
at Sitecore.EmailCampaign.ExperienceAnalytics.Reporting.ReportingClientBase`1.GetRows(String keyRoot, DateTime startDate, DateTime endDate, Boolean skipCache)
at Sitecore.EmailCampaign.ExperienceAnalytics.Reporting.ReportingClientBase`1.<GetStatistics>d__7.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Sitecore.Modules.EmailCampaign.Core.Services.MessageStatisticsService.GetFromAnalytics(Guid managerRootId, Guid messageId)
at Sitecore.Modules.EmailCampaign.Core.Services.MessageStatisticsService.GetFromAnalytics(Guid messageId)
at Sitecore.Modules.EmailCampaign.Core.Data.MessageStatisticsProcessor.UpdateFromAnalyticsData(EmailCampaignsData campaign)
at Sitecore.Modules.EmailCampaign.Core.Data.MessageStatisticsProcessor.UpdateStatistics(EmailCampaignsData campaign)
at Sitecore.Modules.EmailCampaign.Core.Data.MessageStatisticsProcessor.Process(CampaignSearchOptions options)
Nested Exception
Exception: System.ArgumentException
Message: Service Host URI is not a valid URI.
Parameter name: serviceHostUrl
Source: Sitecore.Framework.Conditions
at Sitecore.Framework.Conditions.RequiresValidator`1.ThrowExceptionCore(String condition, String additionalMessage, ConstraintViolationType type)
at Sitecore.Framework.Conditions.Throw.ValueShouldBeTrue[T](ConditionValidator`1 validator, String conditionDescription)
at Sitecore.Analytics.Core.ConfigurationBasedHttpTransportFactory..ctor(String serviceHostUrl, String timeout, BaseLog logger)
at Sitecore.Analytics.Core.ApiKeyHttpTransportFactory..ctor(String serviceHostUrl, Boolean requireHttps, String connectionStringName, String headerName, String minimalApiKeyLength, String timeout)
ManagedPoolThread #1 16:57:11 ERROR Updating campaign data statistics failed for message: 9u7y69b4-jdh3-4877-8411-9513273ca3b1
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters)
at Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.Xdb.Reporting.Datasources.Remote.RemoteReportDataSourceProxy.GetData(ReportDataQuery query)
at Sitecore.Xdb.Reporting.ReportDataProvider.ExecuteQueryWithCache(ReportDataQuery query, ReportDataSource dataSource, CachingPolicy cachingPolicy)
at Sitecore.Xdb.Reporting.ReportDataProvider.GetData(String dataSourceName, ReportDataQuery query, CachingPolicy cachingPolicy)
at Sitecore.ExperienceAnalytics.Api.ReportDataService.ExecuteQuery(IReportQueryData queryData, CachingPolicy cachingPolicy)
at Sitecore.ExperienceAnalytics.Api.ReportingService.RunQuery(ReportQuery reportQuery)
at Sitecore.EmailCampaign.ExperienceAnalytics.Reporting.ReportingClientBase`1.GetRows(String keyRoot, DateTime startDate, DateTime endDate, Boolean skipCache)
at Sitecore.EmailCampaign.ExperienceAnalytics.Reporting.ReportingClientBase`1.<GetStatistics>d__7.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Sitecore.Modules.EmailCampaign.Core.Services.MessageStatisticsService.GetFromAnalytics(Guid managerRootId, Guid messageId)
at Sitecore.Modules.EmailCampaign.Core.Services.MessageStatisticsService.GetFromAnalytics(Guid messageId)
at Sitecore.Modules.EmailCampaign.Core.Data.MessageStatisticsProcessor.UpdateFromAnalyticsData(EmailCampaignsData campaign)
at Sitecore.Modules.EmailCampaign.Core.Data.MessageStatisticsProcessor.UpdateStatistics(EmailCampaignsData campaign)
at Sitecore.Modules.EmailCampaign.Core.Data.MessageStatisticsProcessor.Process(CampaignSearchOptions options)
Nested Exception
Exception: System.ArgumentException
Message: Service Host URI is not a valid URI.
Parameter name: serviceHostUrl
Source: Sitecore.Framework.Conditions
at Sitecore.Framework.Conditions.RequiresValidator`1.ThrowExceptionCore(String condition, String additionalMessage, ConstraintViolationType type)
at Sitecore.Framework.Conditions.Throw.ValueShouldBeTrue[T](ConditionValidator`1 validator, String conditionDescription)
at Sitecore.Analytics.Core.ConfigurationBasedHttpTransportFactory..ctor(String serviceHostUrl, String timeout, BaseLog logger)
at Sitecore.Analytics.Core.ApiKeyHttpTransportFactory..ctor(String serviceHostUrl, Boolean requireHttps, String connectionStringName, String headerName, String minimalApiKeyLength, String timeout)