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

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

Merged
katydecorah merged 6 commits into
masterfrom
search-analytics
Jun 4, 2019
Merged

katydecorah merged 6 commits into
masterfrom
search-analytics

Conversation

@katydecorah

Copy link
Copy Markdown
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 🎉

Comment thread package.json Outdated
"@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
Copy Markdown
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
Copy Markdown
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?

@katydecorah katydecorah Jun 4, 2019 •

Copy link
Copy Markdown
Contributor Author

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.

@colleenmcginnis colleenmcginnis left a comment

Copy link
Copy Markdown
Contributor

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