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

Search Rate Tracking #1558

Merged
merged 7 commits into from
Sep 30, 2021
Merged

Search Rate Tracking #1558

merged 7 commits into from
Sep 30, 2021

Conversation

cea2aj
Copy link
Member

@cea2aj cea2aj commented Sep 28, 2021

Allow search rate tracking by sending impression analytics events when the experience loads

J=SLAP-1600
TEST=manual, integration

View the network tab and see that the answers impression event is fired on load. For the search bar only assets, see that 'standAlone' is true. Also see that 'standaAlone' is true if the regular SDK assets are used but only the search bar component is added to the page. Confirm the other fields are included such as experienceKey, experienceVersion, searcher, and verticalConfigId. Add integration test which confirms that the report function is called properly for both the standard integration and the search bar integration

@coveralls
Copy link

coveralls commented Sep 28, 2021

Coverage Status

Coverage increased (+1.8%) to 61.195% when pulling 40323fa on dev/search-rate into ff35c98 on develop.

if (!this.components.getActiveComponent(SearchComponent.type)) {
this._initQueryUpdateListener(parsedConfig.search);
}

const impressionEvent = createImpressionEvent({
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here, do we need to look at what components are on the actual page first? If there is no SearchBar component on the page, do we fire an impression event? It's also possible that someone could pull down the full SDK and only instantiate a SearchBar component. In that case, should we send standAlone is true?

Copy link
Member Author

Choose a reason for hiding this comment

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

Those are good points. I'll make some updates

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated. I'm assuming that the standalone assets will always put the search bar on the page, so those assets will always set standalone: true

@cea2aj cea2aj merged commit 193b455 into develop Sep 30, 2021
@nmanu1 nmanu1 mentioned this pull request Nov 16, 2021
nmanu1 added a commit that referenced this pull request Nov 16, 2021
## Version 1.12.0
### Features
- Allow search rate tracking (#1558)
- Add support for setting and changing the visitor and passing it to answers-core (#1564)
- Add support for the auth token that is passed in from the config (#1566)
- Add an `environment` field to support consumer auth in Sandbox (#1597)
- Allow components to override the beforeMount function (#1547)
- Add distance to the card data and a function to format it (#1550)
- WCAG updates (allow pagination with Enter (#1575), identify current page in navigation tab (#1576), update autocomplete screen reader support (#1578, #1579))

### Changes
- Update directAnswers component data to include the searcher (#1596)
- Use custom alerts instead of window.alert (#1549)
- Update Mapbox version to match the Theme (#1551)
- Internal repo changes (#1562, #1577)

### Bugfixes
- Fix console error which would appear on google maps (#1548)
- Fix FAQ expansion when default is expanded (#1553)
- Fix error for searches on page load with no businessId (#1561)
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.

3 participants