Add affiliate code revenue analytics (#4883)
* Add affiliate code revenue analytics * clean up some error handling * Add conversions to affiliate code analytics * Only include affiliate subscriptions which have an associated successful charge * wip: affiliate code clicks * affiliate code click ingest route * Add affiliate code clicks to analytics * add new cols
This commit is contained in:
@@ -45,6 +45,21 @@ pub struct PageView {
|
||||
pub headers: Vec<(String, String)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Row, Serialize, Deserialize, Clone, Eq, PartialEq, Hash)]
|
||||
pub struct AffiliateCodeClick {
|
||||
pub recorded: i64,
|
||||
pub domain: String,
|
||||
|
||||
// Modrinth User ID for logged in users
|
||||
pub user_id: u64,
|
||||
pub affiliate_code_id: u64,
|
||||
|
||||
pub ip: Ipv6Addr,
|
||||
pub country: String,
|
||||
pub user_agent: String,
|
||||
pub headers: Vec<(String, String)>,
|
||||
}
|
||||
|
||||
#[derive(Row, Serialize, Deserialize, Clone, Debug, Eq, PartialEq, Hash)]
|
||||
pub struct Playtime {
|
||||
pub recorded: i64,
|
||||
|
||||
Reference in New Issue
Block a user