Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segment integration with pageview tracking #367

Merged
merged 7 commits into from
Mar 18, 2021
Merged

Conversation

macfarlandian
Copy link
Collaborator

@macfarlandian macfarlandian commented Mar 17, 2021

Description of the change

Includes the Segment snippet and integrates pageview tracking with our routing logic (which includes updating the page titles to be more meaningful). Because of our in-page navigation features this couldn't be quite as simple as "log a pageview whenever the URL changes" but I don't think the end result is too unreasonable (and it is tested).

Not visible in code but also done as part of this task was updating some inbound domain filters in Google Analytics to keep staging data out of the metrics, and cleaning up some GA projects that were auto-generated with the various Spotlight Firebase projects but weren't actually being used. (Sentry doesn't support domain filters, so there was nothing to update there, but I did verify that events from this application were being received.)

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Configuration change (adjusts configuration to achieve some end related to functionality, development, performance, or security)

Related issues

Closes #323

Checklists

Development

These boxes should be checked by the submitter prior to merging:

  • Manual testing against realistic data has been performed locally

Code review

These boxes should be checked by reviewers prior to merging:

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has been moved out of a Draft state, has no "Work In Progress" label, and has assigned reviewers
  • Potential security implications or infrastructural changes have been considered, if relevant

@coveralls
Copy link

coveralls commented Mar 17, 2021

Pull Request Test Coverage Report for Build 662851225

  • 21 of 21 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 73.199%

Totals Coverage Status
Change from base Build 661789402: 0.2%
Covered Lines: 2677
Relevant Lines: 3548

💛 - Coveralls

Copy link

@jovergaag jovergaag left a comment

Choose a reason for hiding this comment

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

Sentry doesn't support domain filters, so there was nothing to update there, but I did verify that events from this application were being received.

Sentry does support environment tags so that you can view errors that come from development, staging, and production environments separately. We have implemented that in pulse, but it required removing Sentry from the Segment integration and implementing it directly. I really like the additional detail that we're getting from the errors now that we have more control over them, but it is more code...

@macfarlandian
Copy link
Collaborator Author

yeah I was trying to get that work but eventually stopped short of removing it from Segment and just left it as is instead. I think maybe we'd be better off configuring separate Segment "sources" for our different environments (that seems to be what Segment wants you to do, and we are arguably jumping through additional hoops as a result of not doing that) but I wasn't really prepared to mess with that configuration as part of the scope of this ticket so I just left it alone. Spotlight doesn't generate a lot of errors anyway and virtually all of them are transient fetch failures about which we do nothing so I'm not really that worried about it for now?

@macfarlandian macfarlandian merged commit 969a7df into master Mar 18, 2021
@macfarlandian macfarlandian deleted the ian/323-segment branch March 18, 2021 00:29
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.

Add segment integration to Spotlight v2
3 participants