export interface AnalyticsDay {
	date: string;
	impressions: number;
	clicks: number;
	dismissals?: number;
	product_visits?: number;
	add_to_carts?: number;
	checkout_starts?: number;
	ctr: number;
	click_to_cart_rate?: number;
	cart_to_order_rate?: number;
	conversion_rate?: number;
	attributed_orders?: number;
	attributed_revenue?: number;
	average_order_value?: number;
	revenue_per_thousand_impressions?: number;
}

export interface BasicAnalytics {
	impressions: number;
	clicks: number;
	dismissals: number;
	ctr: number;
	days: AnalyticsDay[];
}

export interface CampaignAnalytics {
	campaign_id: number;
	campaign_name: string;
	impressions: number;
	clicks: number;
	ctr: number;
	product_visits: number;
	add_to_carts: number;
	checkout_starts: number;
	attributed_orders: number;
	attributed_revenue: number;
	click_to_cart_rate: number;
	cart_to_order_rate: number;
	conversion_rate: number;
	average_order_value: number;
	revenue_per_thousand_impressions: number;
}

export interface ExperimentVariantAnalytics {
	id: number;
	name: string;
	impressions: number;
	clicks: number;
	ctr: number;
	attributed_orders: number;
	attributed_revenue: number;
	conversion_rate: number;
}

export interface ExperimentAnalytics {
	campaign_id: number;
	campaign_name: string;
	variants: ExperimentVariantAnalytics[];
	guidance: {
		status: string;
		winner?: number;
		message: string;
	};
}

export interface AdvancedAnalytics extends BasicAnalytics {
	attributed_orders: number;
	attributed_revenue: number;
	product_visits: number;
	add_to_carts: number;
	checkout_starts: number;
	click_to_cart_rate: number;
	cart_to_order_rate: number;
	conversion_rate: number;
	average_order_value: number;
	revenue_per_thousand_impressions: number;
	campaigns: CampaignAnalytics[];
	experiments: ExperimentAnalytics[];
	range_days: number;
	currency: string;
	tracking_enabled: boolean;
	attribution_model: string;
	correlation_notice: string;
}
