3

I have a question regarding a requirement for a client of ours. The client has a number of offices around the world. Traffic coming from these offices (specific IP addresses/ranges) should not be excluded from analytics (so no easy ExcludeRobots configuration).

However, in the Experience Analytics reporting, internal traffic coming from these offices should be excluded by default. A specific (custom?) report needs to be available to view analytics details for all internal traffic.

I'm thinking of creating a specific "Channel type" "Internal traffic" for this, with the different offices around the world as "Channels" below the "Channel Type". Did anyone ever implement something like this? Any other (better) ideas to meet the requirements mentioned above?

What would the technical implementation look like? Probably some pipelines that need to be customized? Can someone elaborate on this?

On the reporting side:

  • How can I filter out all visits from a "Channel type" or specific "Channel" for all default reports in Experience Analytics?

  • How can I create a custom report that only shows the visits from the newly created Channel type "Internal traffic" and underlying offices (as channels)? Is creating such a custom report straightforward?

  • Any other things I need to do (for example related to excluding internal traffic from the Path Analyzer)?

Thanks in advance!

Gert.

  • Gert, I started answering your question, but it seems pretty broad. So I ended up only answering the first part about setting the interaction channel. Could you please separate the part about setting up custom xAnalytics reports into separate question(s)? – Dmytro Shevchenko Feb 2 '17 at 15:37
3

Channel settings are located in the following configuration file:

Include/Channel/Sitecore.Analytics.Channel.config

The determineInteractionChannel pipeline is used to set the channel of the current interaction.

You will need to add a custom processor to this pipeline; it needs to inherit from DetermineChannelProcessorBase. You can find this class in the Sitecore.Analytics.OmniChannel.dll assembly.

public class InternalTrafficChannel : DetermineChannelProcessorBase
{
  private readonly string channelId;

  public InternalTrafficChannel(string channelId)
  {
    this.channelId = channelId;
  }

  public override void Process(DetermineChannelProcessorArgs args)
  {
    if(this.IsInternalTraffic())
    {
      args.ChannelId = new ID(this.channelId);
    }
  }

  private bool IsInternalTraffic()
  {
    // return true if the traffic is internal
  }
}

Create a configuration patch (e.g. under App_Config\Include\zzz) to configure your custom processor:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <determineInteractionChannel>
        <processor type="Some.Namespace.InternalTrafficChannel, Some.Assembly">
          <param desc="channelId">{channel-definition-item-guid}</param>
        </processor>        
      </determineInteractionChannel>
    </pipelines>
  </sitecore>
</configuration>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.