attribution-reporting-api icon indicating copy to clipboard operation
attribution-reporting-api copied to clipboard

DevX: Support for more trigger header misconfigurations

Open maudnals opened this issue 2 years ago • 0 comments

While the validator is already super helpful as it raises errors for most misconfigurations, there are a few easy-to-make mistakes that don't raise errors or warnings yet.

@apasel422 Could we consider adding these errors/warnings as a follow-up?, what do you think?

You can reproduce all of these by running npm run test-trigger; see the data.trigger.js file.

  • Aggregatable keys are set but not values
  • Aggregatable values are set but not keys
  • A key is present in the trigger data but not in the values, or vice-versa. It's an easy mistake to make, especially if folks don't make their key names constants/variables (then this will fail silently).
  • { event_trigger_data: [ { trigger_data: '99' } ] } could raise an error, given that this is over the 3-bit (and 1-bit) limit. (Additionally, is there a way to check for event vs navigation separately? If not, which I guess is the case, we'd need to be a bit creative with the error message for that one.)

Maybe more to follow. I'll add ideas to this issue.

maudnals avatar Jul 01 '22 09:07 maudnals