Skip to content

Update analytics events documentation to pull event name from source#6294

Merged
zachmargolis merged 2 commits intomainfrom
margolis-remove-event-name-tag
May 3, 2022
Merged

Update analytics events documentation to pull event name from source#6294
zachmargolis merged 2 commits intomainfrom
margolis-remove-event-name-tag

Conversation

@zachmargolis
Copy link
Contributor

Why: Currently we have to write each event name in two places, which leaves room for errors.

changelog: Internal, Documentation, Update parsing for analytics events

I spotted an error in https://github.com/18F/identity-idp/pull/6293/files#r864009185, and then realized we had another error in source code already too 🙈 :

# @identity.idp.event_name Account deletion and reset visited
# When a user views the account page
def account_visit
track_event('Account Page Visited')
end

I learned a bit more about the YARD objects in #6289, such as that we have access to the string source of the method, which lets us do cool stuff plike this

**Why**: Currently we have to write each event name in two places,
which leaves room for errors.

changelog: Internal, Documentation, Update parsing for analytics events
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

I also worried about this problem. I think this is much nicer 👍

@zachmargolis zachmargolis merged commit d5d1974 into main May 3, 2022
@zachmargolis zachmargolis deleted the margolis-remove-event-name-tag branch May 3, 2022 18:35
peggles2 pushed a commit that referenced this pull request May 3, 2022
…6294)

* Update analytics events documentation to pull event name from source

**Why**: Currently we have to write each event name in two places,
which leaves room for errors.

changelog: Internal, Documentation, Update parsing for analytics events
zachmargolis added a commit that referenced this pull request May 4, 2022
- As of #6294, having it will cause build breakage since it's
  an unknown tag
zachmargolis added a commit that referenced this pull request May 4, 2022
* Remove @identity.idp.event_name

- As of #6294, having it will cause build breakage since it's
  an unknown tag

* Remove blank lines

* Add clearer comments for each event
gsa-manish added a commit that referenced this pull request May 5, 2022
* LG-5929-document-analytics-11

* Patch: analytics events 11 (#6303)

* Remove @identity.idp.event_name

- As of #6294, having it will cause build breakage since it's
  an unknown tag

* Remove blank lines

* Add clearer comments for each event

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
peggles2 pushed a commit that referenced this pull request May 5, 2022
…6294)

* Update analytics events documentation to pull event name from source

**Why**: Currently we have to write each event name in two places,
which leaves room for errors.

changelog: Internal, Documentation, Update parsing for analytics events
peggles2 pushed a commit that referenced this pull request May 5, 2022
* LG-5929-document-analytics-11

* Patch: analytics events 11 (#6303)

* Remove @identity.idp.event_name

- As of #6294, having it will cause build breakage since it's
  an unknown tag

* Remove blank lines

* Add clearer comments for each event

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
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