Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common/app/controllers/EmailSignupController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ case class EmailForm(
referrer: Option[String],
ref: Option[String],
refViewId: Option[String],
browserId: Option[String],
campaignCode: Option[String],
googleRecaptchaResponse: Option[String],
name: Option[String],
Expand Down Expand Up @@ -68,6 +69,7 @@ class EmailFormService(wsClient: WSClient, emailEmbedAgent: NewsletterSignupAgen
"set-lists" -> List(form.listName),
"set-consents" -> form.marketing.filter(_ == true).map(_ => List("similar_guardian_products")),
"unset-consents" -> form.marketing.filter(_ == false).map(_ => List("similar_guardian_products")),
"browser-id" -> form.browserId,
)
.fields,
)
Expand Down Expand Up @@ -149,6 +151,7 @@ class EmailSignupController(
"referrer" -> optional[String](of[String]),
"ref" -> optional[String](of[String]),
"refViewId" -> optional[String](of[String]),
"browserId" -> optional[String](of[String]),
"campaignCode" -> optional[String](of[String]),
"g-recaptcha-response" -> optional[String](of[String]),
"name" -> optional[String](of[String]),
Expand Down Expand Up @@ -500,6 +503,7 @@ class EmailSignupController(
s"Post request received to /email/ - " +
s"ref: ${form.ref}, " +
s"refViewId: ${form.refViewId}, " +
s"browserId: ${form.browserId}, " +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a unique identifier would it be better to not log it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good point! I'm going to ask Emily tomorrow

s"referer: ${request.headers.get("referer").getOrElse("unknown")}, " +
s"user-agent: ${request.headers.get("user-agent").getOrElse("unknown")}, " +
s"x-requested-with: ${request.headers.get("x-requested-with").getOrElse("unknown")}",
Expand Down