pub struct Activity {Show 15 fields
pub activity_time: Option<DateTime<Utc>>,
pub activity_type: Option<String>,
pub appview: Option<ScreenviewData>,
pub campaign: Option<String>,
pub channel_grouping: Option<String>,
pub custom_dimension: Option<Vec<CustomDimension>>,
pub ecommerce: Option<EcommerceData>,
pub event: Option<EventData>,
pub goals: Option<GoalSetData>,
pub hostname: Option<String>,
pub keyword: Option<String>,
pub landing_page_path: Option<String>,
pub medium: Option<String>,
pub pageview: Option<PageviewData>,
pub source: Option<String>,
}
Expand description
An Activity represents data for an activity of a user. Note that an Activity is different from a hit. A hit might result in multiple Activity’s. For example, if a hit includes a transaction and a goal completion, there will be two Activity protos for this hit, one for ECOMMERCE and one for GOAL. Conversely, multiple hits can also construct one Activity. In classic e-commerce, data for one transaction might be sent through multiple hits. These hits will be merged into one ECOMMERCE Activity.
This type is not used in any activity, and only used as part of another schema.
Fields§
§activity_time: Option<DateTime<Utc>>
Timestamp of the activity. If activities for a visit cross midnight and occur in two separate dates, then two sessions (one per date) share the session identifier. For example, say session ID 113472 has activity within 2019-08-20, and session ID 243742 has activity within 2019-08-25 and 2019-08-26. Session ID 113472 is one session, and session ID 243742 is two sessions.
activity_type: Option<String>
Type of this activity.
appview: Option<ScreenviewData>
This will be set if activity_type
equals SCREEN_VIEW
.
campaign: Option<String>
For manual campaign tracking, it is the value of the utm_campaign campaign tracking parameter. For AdWords autotagging, it is the name(s) of the online ad campaign(s) you use for the property. If you use neither, its value is (not set).
channel_grouping: Option<String>
The Channel Group associated with an end user’s session for this View (defined by the View’s Channel Groupings).
custom_dimension: Option<Vec<CustomDimension>>
A list of all custom dimensions associated with this activity.
ecommerce: Option<EcommerceData>
This will be set if activity_type
equals ECOMMERCE
.
event: Option<EventData>
This field contains all the details pertaining to an event and will be set if activity_type
equals EVENT
.
goals: Option<GoalSetData>
This field contains a list of all the goals that were reached in this activity when activity_type
equals GOAL
.
hostname: Option<String>
The hostname from which the tracking request was made.
keyword: Option<String>
For manual campaign tracking, it is the value of the utm_term campaign tracking parameter. For AdWords traffic, it contains the best matching targeting criteria. For the display network, where multiple targeting criteria could have caused the ad to show up, it returns the best matching targeting criteria as selected by Ads. This could be display_keyword, site placement, boomuserlist, user_interest, age, or gender. Otherwise its value is (not set).
landing_page_path: Option<String>
The first page in users’ sessions, or the landing page.
medium: Option<String>
The type of referrals. For manual campaign tracking, it is the value of the utm_medium campaign tracking parameter. For AdWords autotagging, it is cpc. If users came from a search engine detected by Google Analytics, it is organic. If the referrer is not a search engine, it is referral. If users came directly to the property and document.referrer is empty, its value is (none).
pageview: Option<PageviewData>
This will be set if activity_type
equals PAGEVIEW
. This field contains all the details about the visitor and the page that was visited.
source: Option<String>
The source of referrals. For manual campaign tracking, it is the value of the utm_source campaign tracking parameter. For AdWords autotagging, it is google. If you use neither, it is the domain of the source (e.g., document.referrer) referring the users. It may also contain a port address. If users arrived without a referrer, its value is (direct).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Activity
impl<'de> Deserialize<'de> for Activity
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>,
impl Part for Activity
Auto Trait Implementations§
impl Freeze for Activity
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnwindSafe for Activity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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