Skip to content

LG-5947 Document Analytics Events 4#6159

Merged
theabrad merged 16 commits intomainfrom
lg-5947-analytics-events-4
Apr 7, 2022
Merged

LG-5947 Document Analytics Events 4#6159
theabrad merged 16 commits intomainfrom
lg-5947-analytics-events-4

Conversation

@theabrad
Copy link
Contributor

@theabrad theabrad commented Apr 5, 2022

Why?: Documenting More Analytics Events

changelog: Internal, Documentation, Document additional analytics events
# @identity.idp.event_name Return to SP: Failed to proof
# Tracks when a service provide fails to proof.
# @param [String] redirect_url the url of the service provider
def return_to_sp_failure_to_proof(url, **location_params)
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. can we make url keyword argument to match?
  2. looks like we can rely on location_params to have fairly consistent keys, let's use those?
    PERMITTED_LOCATION_PARAMS = [:flow, :step, :location].freeze
Suggested change
def return_to_sp_failure_to_proof(url, **location_params)
def return_to_sp_failure_to_proof(url:, flow: nil, step: nil, location: nil, **extra)

Comment on lines 271 to 277
# @param [Hash] result_hash hash containing the result of accepting the rules of use
def rules_of_use_submitted(result_hash, **extra)
track_event(
'Rules of Use Submitted',
result_hash,
**extra,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

can can we document what's inside result_hash? Usually there are sucess: errors: and some other extra attributes

Comment on lines 283 to 286
def security_event_received(result_hash, **extra)
track_event(
'RISC: Security event received',
result_hash,
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto for result_hash

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM! some small wording suggestions

Analytics::RETURN_TO_SP_FAILURE_TO_PROOF,
redirect_url: 'https://sp.gov/failure_to_proof',
'Return to SP: Failed to proof',
hash_including(redirect_url: 'https://sp.gov/failure_to_proof'),
Copy link
Contributor

Choose a reason for hiding this comment

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

this would still work without hash_including, right?

theabrad and others added 5 commits April 6, 2022 13:41
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
@theabrad theabrad merged commit ad9e2cd into main Apr 7, 2022
@theabrad theabrad deleted the lg-5947-analytics-events-4 branch April 7, 2022 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants