Skip to content

Instantly share code, notes, and snippets.

@agehlot
Last active March 13, 2021 14:35
Show Gist options
  • Save agehlot/249fc4e4063ace8effc1d58566d9cb8d to your computer and use it in GitHub Desktop.
Save agehlot/249fc4e4063ace8effc1d58566d9cb8d to your computer and use it in GitHub Desktop.
Sitecore Aggregation pipeline processor code
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