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
referrerTypeReferrerTypeThe detected referrer type.
referrerDomainstringThe referrer domain, if any.
sourceNamestringThe UTM source name, if any.
sourceCampaignstringThe 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
sourceTrafficSourceThe traffic source.
Returns
- string
A display label.