Closed YesThatAllen closed 6 years ago
Glad to help.. feel free to squash these commits at merge.
This will still not work. Here you're just passing the parameters to our wrappers, but you need to forward it to the actual algolia libraries calls.
That's both places described in my first comment.
In autocomplete.js
, you'll need to:
analytics
from the constructor
parameters.analytics
to the render
function parameters.Modify, in render
the params, like so
const params = {
+ analytics,
hitsPerPage,
facetFilters: `["locale.locale:${locale}"]`,
highlightPreTag: '<span class="aa-article-hit--highlight">',
highlightPostTag: '</span>',
attributesToSnippet: [`body_safe:${nbSnippetWords}`],
snippetEllipsisText: '...'
};
In instantsearch.js
, you'll need to:
analytics
from the render
parameters.Modify, in contructor
the params, like so
searchParameters: {
+ analytics,
attributesToSnippet: ['body_safe:40'],
highlightPreTag: '<span class="ais-highlight">',
highlightPostTag: '</span>',
snippetEllipsisText: '...'
},
How are your tests of the library doing on your Help Center?
How are your tests of the library doing on your Help Center?
Poorly. Per the local testing docs, yarn
installs, but I get only
$ PORT=3005 yarn dev
yarn run v1.12.1
error Command "dev" not found.
Thoughts? but honestly, relying on me to test this may not be the best plan long-term.. I'm far out of my league on this.
Thoughts? but honestly, relying on me to test this may not be the best plan long-term.. I'm far out of my league on this.
No worries! I'm trying to point you in the right directions as you've started implementing it, but I can definitely take back ownership on it if this is what you want.
Fantastic. Very happy for you to take this & run with it. Looking forward to the feature add!
Based on the queries I see being sent over, this is where I think the
analytics
key needs to be set.Closes #76