Table of Contents

Class TrafficSourceClassifier

Namespace
Dynamicweb.Tracking.Reporting
Assembly
Dynamicweb.Core.dll

Classifies a tracked session into a friendly TrafficSource from its ReferrerType and UTM/source fields.

public static class TrafficSourceClassifier
Inheritance
TrafficSourceClassifier
Inherited Members

Remarks

This is a read-time classification only. It does not change the tracking write path or the ReferrerType enum. Precedence is: campaign, organic, referral, direct, other. The integer values of TrafficSource are relied upon by the dashboard SQL (a CASE expression emits the same ordinals), so keep the enum order stable.

Methods

Classify(ReferrerType, string?, string?, string?)

Classifies a session into a TrafficSource.

public static TrafficSource Classify(ReferrerType referrerType, string? referrerDomain, string? sourceName, string? sourceCampaign)

Parameters

referrerType ReferrerType

The detected referrer type.

referrerDomain string

The referrer domain, if any.

sourceName string

The UTM source name, if any.

sourceCampaign string

The UTM campaign, if any.

Returns

TrafficSource

The friendly traffic source bucket.

GetLabel(TrafficSource)

Gets a human-readable label for a TrafficSource bucket.

public static string GetLabel(TrafficSource source)

Parameters

source TrafficSource

The traffic source.

Returns

string

A display label.

To top