Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

[search] adds segment tracking for queries and clicks #140

Merged
merged 6 commits into from
Jun 4, 2019

Conversation

katydecorah
Copy link
Contributor

This PR adds tracking to our Search component for:

  1. Queries typed
  2. Result clicked

How to test:

  1. npm install
  2. npm start
  3. open segment > sources > mapbox-staging (leave window open)
  4. in another window: navigate to http://192.168.7.223:9966/Search
  5. type a query, click a result
  6. switch back to segment and click "Pause" and search for "Searched docs" events. Click each one. You should see an event for the queries and an event for the clicked item:

image

When you click "Raw" you'll see the metadata attached with the event, including page searched from 🎉

package.json Outdated
@@ -35,6 +35,7 @@
"@mapbox/eslint-config-mapbox": "^1.2.1",
"@mapbox/mbx-assembly": "^0.28.2",
"@mapbox/react-test-kitchen": "^0.1.3",
"@mapbox/web-analytics": "^0.5.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: this is a private module. Including it makes it far easier to test segment events, but not easy for teammates who don't have access. I think we should leave for now for testing purposes, but can circle back if it becomes a blocker for others.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still an issue now that it's moved to optional dependencies?

Copy link
Contributor Author

@katydecorah katydecorah Jun 4, 2019

Choose a reason for hiding this comment

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

@colleenmcginnis now that it's an optional dependencies, I don't think non-aws users will have an issue installing this repo locally.

Also want to note that web-analytics is installed here for local testing only (so we can make sure events are getting tracked) - it won't get bundled in the dr-ui build.

Copy link
Contributor

@colleenmcginnis colleenmcginnis left a comment

Choose a reason for hiding this comment

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

@katydecorah thanks for helping me debug the debugger! Looks good to me. 💐

Katy DeCorah added 2 commits June 4, 2019 13:35
* master:
  [search] add ability to filter results (#138)
@katydecorah katydecorah merged commit 93a0e68 into master Jun 4, 2019
@katydecorah katydecorah deleted the search-analytics branch June 4, 2019 17:40
katydecorah pushed a commit that referenced this pull request Jun 5, 2019
* master:
  0.15.1
  Prepare 0.15.1
  0.15.0
  Prepare 0.15.0
  [search] adds segment tracking for queries and clicks (#140)
  [search] add ability to filter results (#138)
  increase modal zindex to prevent collision with topbar sticker (#139)
katydecorah pushed a commit that referenced this pull request Jun 5, 2019
* master:
  add snapshot tests (#136)
  0.15.1
  Prepare 0.15.1
  0.15.0
  Prepare 0.15.0
  [search] adds segment tracking for queries and clicks (#140)
  [search] add ability to filter results (#138)
  increase modal zindex to prevent collision with topbar sticker (#139)
  0.14.0
  Prepare 0.14.0
  [PageLayout/TopbarSticker] increase zIndex (#134)
  [search] Introduce search modal (#133)
  prepare 0.13.0
  adjust version-sort for XX.XX.XX format (#132)
katydecorah pushed a commit that referenced this pull request Jun 19, 2019
* master:
  0.16.2
  Prepare 0.16.2
  0.16.1
  Prepare 0.16.1
  0.16.0
  Prepare 0.16.0
  [search] update search-ui, add loader, increase debounce length (#145)
  0.15.2
  Prepare 0.15.2
  🐛do not package optionalDependencies and jest (#143)
  add snapshot tests (#136)
  0.15.1
  Prepare 0.15.1
  0.15.0
  Prepare 0.15.0
  [search] adds segment tracking for queries and clicks (#140)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants