Last active
March 13, 2021 14:35
-
-
Save agehlot/249fc4e4063ace8effc1d58566d9cb8d to your computer and use it in GitHub Desktop.
Sitecore Aggregation pipeline processor code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Extensions.DependencyInjection; | |
using Sitecore.Analytics.Aggregation.Pipeline; | |
using Sitecore.Configuration; | |
using Sitecore.Data; | |
using Sitecore.DependencyInjection; | |
using Sitecore.Diagnostics; | |
using Sitecore.XConnect.Collection.Model; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Core.Foundation.Analytics.Collection.Pipelines.Aggregation | |
{ | |
[Service(typeof(PageEventProcessor))] | |
public class PageEventProcessor : InteractionAggregationPipelineProcessor | |
{ | |
#region Constructor | |
public PageEventProcessor() | |
{ | |
} | |
#endregion | |
#region Processor | |
/// <summary> | |
/// Called when [process]. | |
/// </summary> | |
/// <param name="args">The arguments.</param> | |
protected override void OnProcess(InteractionAggregationPipelineArgs args) | |
{ | |
//var useragent = args.Context.Interaction.UserAgent; | |
var contact = args.Context.Contact; | |
var interaction = args.Context.Interaction; | |
var debugText = "Aggregation, PageEventProcessor.OnProcess()"; | |
if (contact == null) | |
{ | |
Log.Fatal($"{debugText}: args.Context.Contact is null", this); | |
return; | |
} | |
//var isKnownContact = contact.Identifiers.Any(c => c.IdentifierType == ContactIdentifierType.Known); | |
} | |
} | |
#endregion | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment