pub struct SessionAnalytics {Show 22 fields
pub ip_address: Option<String>,
pub user_agent: Option<String>,
pub device_type: Option<String>,
pub browser: Option<String>,
pub os: Option<String>,
pub fingerprint_hash: Option<String>,
pub preferred_locale: Option<String>,
pub country: Option<String>,
pub region: Option<String>,
pub city: Option<String>,
pub referrer_source: Option<String>,
pub referrer_url: Option<String>,
pub landing_page: Option<String>,
pub entry_url: Option<String>,
pub utm_source: Option<String>,
pub utm_medium: Option<String>,
pub utm_campaign: Option<String>,
pub utm_content: Option<String>,
pub utm_term: Option<String>,
pub is_bot: bool,
pub is_ai_crawler: bool,
pub skip_tracking: bool,
}Expand description
A single HTTP request reduced to the signals the session pipeline records.
Produced once per request by an AnalyticsProvider and passed by
reference from there on — the classification verdicts (is_bot,
is_ai_crawler, skip_tracking) are decided by the provider, which owns
the keyword tables, so no consumer re-derives them.
Fields§
§ip_address: Option<String>§user_agent: Option<String>§device_type: Option<String>§browser: Option<String>§os: Option<String>§fingerprint_hash: Option<String>§preferred_locale: Option<String>§country: Option<String>§region: Option<String>§city: Option<String>§referrer_source: Option<String>§referrer_url: Option<String>§landing_page: Option<String>§entry_url: Option<String>§utm_source: Option<String>§utm_medium: Option<String>§utm_campaign: Option<String>§utm_content: Option<String>§utm_term: Option<String>§is_bot: bool§is_ai_crawler: bool§skip_tracking: boolWhether the session pipeline should suppress the analytics write.
Broader than is_bot: also covers bot IP ranges, datacenter ranges,
high-risk countries, and spam referrers.
Implementations§
Source§impl SessionAnalytics
impl SessionAnalytics
Sourcepub fn compute_fingerprint(&self) -> String
pub fn compute_fingerprint(&self) -> String
Returns the client-supplied fingerprint when present, else derives a stable one from the user agent and locale.
Trait Implementations§
Source§impl Clone for SessionAnalytics
impl Clone for SessionAnalytics
Source§fn clone(&self) -> SessionAnalytics
fn clone(&self) -> SessionAnalytics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionAnalytics
impl Debug for SessionAnalytics
Source§impl Default for SessionAnalytics
impl Default for SessionAnalytics
Source§fn default() -> SessionAnalytics
fn default() -> SessionAnalytics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SessionAnalytics
impl RefUnwindSafe for SessionAnalytics
impl Send for SessionAnalytics
impl Sync for SessionAnalytics
impl Unpin for SessionAnalytics
impl UnsafeUnpin for SessionAnalytics
impl UnwindSafe for SessionAnalytics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more