@@ -38,6 +38,7 @@ var validAttributionKeys = map[string]bool{
3838 "visit_id" : true , // https://bugzilla.mozilla.org/show_bug.cgi?id=1677497
3939 "session_id" : true , // https://bugzilla.mozilla.org/show_bug.cgi?id=1809120
4040 "client_id" : true , // Alias of `visit_id`.
41+ "dlsource" : true ,
4142}
4243
4344// If any of these are not set in the incoming payload, they will be set to '(not set)'
@@ -63,16 +64,17 @@ func generateDownloadToken() string {
6364
6465// Code represents a valid attribution code
6566type Code struct {
66- Source string
67- Medium string
68- Campaign string
69- Content string
70- Experiment string
71- InstallerType string
72- Variation string
73- UA string
74- ClientID string
75- SessionID string
67+ Source string
68+ Medium string
69+ Campaign string
70+ Content string
71+ Experiment string
72+ InstallerType string
73+ Variation string
74+ UA string
75+ ClientID string
76+ SessionID string
77+ DownloadSource string
7678
7779 downloadToken string
7880
@@ -194,16 +196,17 @@ func (v *Validator) Validate(code, sig, refererHeader string) (*Code, error) {
194196 }
195197
196198 attributionCode := & Code {
197- Source : vals .Get ("source" ),
198- Medium : vals .Get ("medium" ),
199- Campaign : vals .Get ("campaign" ),
200- Content : vals .Get ("content" ),
201- Experiment : vals .Get ("experiment" ),
202- InstallerType : vals .Get ("installer_type" ),
203- Variation : vals .Get ("variation" ),
204- UA : vals .Get ("ua" ),
205- ClientID : clientID ,
206- SessionID : vals .Get ("session_id" ),
199+ Source : vals .Get ("source" ),
200+ Medium : vals .Get ("medium" ),
201+ Campaign : vals .Get ("campaign" ),
202+ Content : vals .Get ("content" ),
203+ Experiment : vals .Get ("experiment" ),
204+ InstallerType : vals .Get ("installer_type" ),
205+ Variation : vals .Get ("variation" ),
206+ UA : vals .Get ("ua" ),
207+ ClientID : clientID ,
208+ SessionID : vals .Get ("session_id" ),
209+ DownloadSource : vals .Get ("dlsource" ),
207210
208211 rawURLVals : vals ,
209212 }
0 commit comments