Skip to content

Commit

Permalink
chore(cisa): add note about insights option in templates (#5909)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhayab committed Oct 26, 2023
1 parent 675f1a0 commit 2859660
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/create-instantsearch-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ cd my-app
yarn start
```

> **Important**
> Selecting 'Y' when being prompted to ‘Enable user events’ activates the [`insights`](https://www.algolia.com/doc/api-reference/widgets/instantsearch/js/#widget-param-insights) option for compatible templates, allowing Algolia to process your user Events. Events can unlock powerful features, enhancing your application's effectiveness and we encourage you to consider enabling this valuable functionality. Please review our [API reference](https://www.algolia.com/doc/api-reference/widgets/instantsearch/js/#widget-param-insights) for more details about Events collection and settings.

## Usage

This package comes with the module `createInstantSearchApp(path, options?)` and the command-line tool `create-instantsearch-app`.
Expand Down Expand Up @@ -110,7 +114,8 @@ The `config` flag is handy to automate app generations.
"indexName": "MY_INDEX_NAME",
"searchPlaceholder": "Search",
"attributesToDisplay": ["name", "description"],
"attributesForFaceting": ["brand", "location"]
"attributesForFaceting": ["brand", "location"],
"enableInsights": true
}
```

Expand All @@ -132,6 +137,7 @@ const app = createInstantSearchApp('~/lab/my-app', {
libraryVersion: '2.0.0',
attributesToDisplay: ['name', 'description'],
attributesForFaceting: ['keywords'],
enableInsights: true,
});

app.create().then(() => console.log('App generated!'));
Expand Down

0 comments on commit 2859660

Please sign in to comment.