pub struct TrackResponse {
pub cache: Option<String>,
pub session_id: Option<String>,
pub visit_id: Option<String>,
pub disabled: bool,
pub extra: Map<String, Value>,
}Expand description
Response returned after sending one analytics track.
Umami can intentionally ignore bot or disabled traffic and return a small
response without session identifiers. Use TrackResponse::is_tracked to
distinguish that case without relying on undocumented fields.
Fields§
§cache: Option<String>Cache value that can be supplied with a later request from this session.
session_id: Option<String>Derived Umami session ID.
visit_id: Option<String>Derived Umami visit ID.
disabled: boolWhether collection was disabled by the server or gateway.
extra: Map<String, Value>Additional forward-compatible response fields.
Implementations§
Source§impl TrackResponse
impl TrackResponse
Sourcepub fn is_tracked(&self) -> bool
pub fn is_tracked(&self) -> bool
Returns true when Umami recorded the track and issued session metadata.
Sourcepub fn is_ignored(&self) -> bool
pub fn is_ignored(&self) -> bool
Returns true when Umami accepted the request but did not record it.
Trait Implementations§
Source§impl Clone for TrackResponse
impl Clone for TrackResponse
Source§impl Debug for TrackResponse
impl Debug for TrackResponse
Source§impl Default for TrackResponse
impl Default for TrackResponse
Source§impl<'de> Deserialize<'de> for TrackResponse
impl<'de> Deserialize<'de> for TrackResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TrackResponse
impl RefUnwindSafe for TrackResponse
impl Send for TrackResponse
impl Sync for TrackResponse
impl Unpin for TrackResponse
impl UnsafeUnpin for TrackResponse
impl UnwindSafe for TrackResponse
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