/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.104.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// AdFunnelCounts : Named conversion-funnel steps, resolved from the same data as `actions` so you never have to parse action-type strings yourself. Meta reports one event under several action types at once (`offsite_conversion.fb_pixel_purchase`, `omni_purchase`, `purchase`, …). Each field below takes the FIRST family member present rather than summing them, which is what makes these counts safe to add up. Summing the raw `actions` keys yourself double or triple counts. The same priority order backs `conversions`, so a purchase-optimised campaign reports the identical number in `conversions` and `funnel.purchases`. Every field is 0 when that step never fired. Populated for Meta ads; other platforms report a different action taxonomy and generally leave these at 0 (read `actions` for those). At ad-set and campaign level each step is summed from its per-ad values.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AdFunnelCounts {
/// Landing page views: the visitor actually loaded the destination, unlike a link click. Meta `landing_page_view`.
#[serde(rename = "landingPageViews", skip_serializing_if = "Option::is_none")]
pub landing_page_views: Option<i32>,
/// Content views (Meta `ViewContent` pixel event).
#[serde(rename = "contentViews", skip_serializing_if = "Option::is_none")]
pub content_views: Option<i32>,
/// On-site searches (Meta `Search` pixel event).
#[serde(rename = "searches", skip_serializing_if = "Option::is_none")]
pub searches: Option<i32>,
/// Adds to wishlist (Meta `AddToWishlist` pixel event).
#[serde(rename = "wishlistAdds", skip_serializing_if = "Option::is_none")]
pub wishlist_adds: Option<i32>,
/// Adds to cart (Meta `AddToCart` pixel event).
#[serde(rename = "cartAdds", skip_serializing_if = "Option::is_none")]
pub cart_adds: Option<i32>,
/// Checkouts started (Meta `InitiateCheckout` pixel event).
#[serde(rename = "checkoutsInitiated", skip_serializing_if = "Option::is_none")]
pub checkouts_initiated: Option<i32>,
/// Payment details added at checkout (Meta `AddPaymentInfo` pixel event).
#[serde(rename = "paymentInfoAdds", skip_serializing_if = "Option::is_none")]
pub payment_info_adds: Option<i32>,
/// Purchases (Meta `Purchase` pixel event). Pair with `purchaseValue` for revenue.
#[serde(rename = "purchases", skip_serializing_if = "Option::is_none")]
pub purchases: Option<i32>,
/// Leads, from either the website pixel or an instant form, whichever the ad uses.
#[serde(rename = "leads", skip_serializing_if = "Option::is_none")]
pub leads: Option<i32>,
/// Completed registrations (Meta `CompleteRegistration` pixel event).
#[serde(
rename = "registrationsCompleted",
skip_serializing_if = "Option::is_none"
)]
pub registrations_completed: Option<i32>,
/// Mobile app installs attributed to the ad.
#[serde(rename = "appInstalls", skip_serializing_if = "Option::is_none")]
pub app_installs: Option<i32>,
/// Messaging conversations started within 7 days, the headline metric for click-to-WhatsApp and click-to-Messenger ads.
#[serde(
rename = "messagingConversationsStarted",
skip_serializing_if = "Option::is_none"
)]
pub messaging_conversations_started: Option<i32>,
/// Messaging threads where the person sent a first reply.
#[serde(
rename = "messagingFirstReplies",
skip_serializing_if = "Option::is_none"
)]
pub messaging_first_replies: Option<i32>,
}
impl AdFunnelCounts {
/// Named conversion-funnel steps, resolved from the same data as `actions` so you never have to parse action-type strings yourself. Meta reports one event under several action types at once (`offsite_conversion.fb_pixel_purchase`, `omni_purchase`, `purchase`, …). Each field below takes the FIRST family member present rather than summing them, which is what makes these counts safe to add up. Summing the raw `actions` keys yourself double or triple counts. The same priority order backs `conversions`, so a purchase-optimised campaign reports the identical number in `conversions` and `funnel.purchases`. Every field is 0 when that step never fired. Populated for Meta ads; other platforms report a different action taxonomy and generally leave these at 0 (read `actions` for those). At ad-set and campaign level each step is summed from its per-ad values.
pub fn new() -> AdFunnelCounts {
AdFunnelCounts {
landing_page_views: None,
content_views: None,
searches: None,
wishlist_adds: None,
cart_adds: None,
checkouts_initiated: None,
payment_info_adds: None,
purchases: None,
leads: None,
registrations_completed: None,
app_installs: None,
messaging_conversations_started: None,
messaging_first_replies: None,
}
}
}