forked from segmentio/segment-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Algolia insights update docs #1
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
Draft
beatrice94
wants to merge
4
commits into
develop
Choose a base branch
from
algolia-insights-update-docs
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+1.21 MB
src/connections/destinations/catalog/algolia-insights/images/algolia_api_keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+501 KB
...ctions/destinations/catalog/algolia-insights/images/algolia_app_id_dropdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.48 MB
...ons/destinations/catalog/algolia-insights/images/algolia_dashboard_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+814 KB
...nections/destinations/catalog/algolia-insights/images/algolia_settings_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+208 KB
src/connections/destinations/catalog/algolia-insights/images/mapping_tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+202 KB
src/connections/destinations/catalog/algolia-insights/images/mapping_tab_edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ beta: true | |
redirect_from: '/connections/destinations/catalog/algolia/' | ||
id: 5d373a350abf930001a6b70f | ||
--- | ||
[Algolia Insights](https://www.algolia.com/products/analytics/) lets you push events related to how your product is being used. Sending those events is a required step for using several Algolia features: | ||
This [Algolia Insights](https://www.algolia.com/products/analytics/) destination is a means of facilitating sending [Insights Events](https://www.algolia.com/doc/guides/sending-events/getting-started/). Sending these events is a required step for using several Algolia features: | ||
|
||
- Click and conversion analytics | ||
- A/B Testing | ||
|
@@ -24,31 +24,49 @@ This destination is maintained by [Algolia](https://www.algolia.com/). For any i | |
2. Search for "Algolia" in the Catalog, select it, and choose which of your sources to connect the destination to. | ||
3. Enter the "App ID" & "API Key" into your Segment Settings UI which you can find on the Algolia Dashboard, under API Keys menu. | ||
|
||
_**NOTE:** The Algolia Insights Destination is not a plug-and-play integration. It requires you to modify your frontend code to send additional Algolia-related data like index name, queryID, etc._ | ||
To find your App ID, there are two options. You can find the App Id in the Application dropdown in the Dashboard. | ||
|
||
 | ||
|
||
You can read more about how to send Algolia-related data to Segment from [the documentation at Algolia](https://www.algolia.com/doc/guides/sending-events/implementing/connectors/segment/). | ||
The other location is where you will also find your API Keys. You can find your API Keys in your settings under API Keys, you will need a Search API Key to set up the Destination in Segment. | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
|
||
> _**NOTE:** The Algolia Insights Destination is not a plug-and-play integration. It requires you to modify your frontend code to send additional Algolia-related data like index name, queryID, etc._ | ||
|
||
To access your queryID, make sure clickAnalytics are enabled in your search event. If you're using Insights.js this will look like | ||
```js | ||
index.search('query', { | ||
userToken: 'user-1', | ||
clickAnalytics: true | ||
}) | ||
``` | ||
|
||
Once this is enabled you will be able to send properties like queryId in your segment events. You can read more about how to send Algolia-related data to Segment from [the documentation at Algolia](https://www.algolia.com/doc/guides/sending-events/implementing/connectors/segment/). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call linking to our docs. |
||
|
||
## Mapping Events | ||
|
||
By default, Algolia has set up mappings for Product Clicked, Product Viewed and Order Completed events. If your event structure doesn't match [Segments V2 Ecommerce Spec](/docs/connections/spec/ecommerce/v2/) you can update this by using the Mapping Tab. | ||
|
||
 | ||
|
||
 | ||
|
||
## Track | ||
|
||
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does. | ||
|
||
Algolia supports the following six events from Segment's [Ecommerce Spec](/docs/connections/spec/ecommerce/v2/). | ||
Algolia supports the following events from Segment's [Ecommerce Spec](/docs/connections/spec/ecommerce/v2/). | ||
|
||
<table> | ||
<tr> | ||
<td>Supported Events</td> | ||
<td>Description</td> | ||
</tr> | ||
<tr> | ||
<td><code>Product List Viewed</code></td> | ||
<td>Fire this event when a visitor views a product list or category.</td> | ||
</tr> | ||
<tr> | ||
<td><code>Product List Filtered</code></td> | ||
<td>Fire this event when a visitor filters a product list or category.</td> | ||
</tr> | ||
<tr> | ||
<td><code>Product Viewed</code></td> | ||
<td>Fire this event when a visitor views a product.</td> | ||
|
@@ -57,10 +75,6 @@ Algolia supports the following six events from Segment's [Ecommerce Spec](/docs/ | |
<td><code>Product Clicked</code></td> | ||
<td>Fire this event when a visitor clicks a product.</td> | ||
</tr> | ||
<tr> | ||
<td><code>Product Added</code></td> | ||
<td>Fire this event when a visitor adds a product to their shopping cart.</td> | ||
</tr> | ||
<tr> | ||
<td><code>Order Completed</code></td> | ||
<td>Fire this event whenever an order/transaction was successfully completed by the customer.</td> | ||
|
@@ -70,31 +84,13 @@ Algolia supports the following six events from Segment's [Ecommerce Spec](/docs/ | |
For a full list of required properties for each event type, see the [Spec: V2 Ecommerce Events](/docs/connections/spec/ecommerce/v2/) | ||
|
||
```js | ||
analytics.track('Product List Viewed', { | ||
index: "my-index-name", | ||
queryID: "Algolia queryID", // required only for Click Analytics, | ||
products: [{ | ||
objectID: "hit objectID", | ||
// ... other required properties from the spec | ||
}] | ||
}) | ||
|
||
analytics.track('Product List Filtered', { | ||
index: "my-index-name", | ||
filters: [ | ||
{ type : "free_delivery", value: "true" } | ||
], | ||
// ... other required properties from the spec | ||
}) | ||
|
||
analytics.track('Product Viewed', { | ||
objectID: "hit objectID", | ||
index: "my-index-name", | ||
queryID: "Algolia queryID", // required only for Click Analytics, | ||
// ... other required properties from the spec | ||
}) | ||
|
||
|
||
analytics.track('Product Clicked', { | ||
objectID: "hit objectID", | ||
position: hitPositionOnIndex, // number | ||
|
@@ -103,13 +99,6 @@ analytics.track('Product Clicked', { | |
// ... other required properties from the spec | ||
}) | ||
|
||
analytics.track('Product Added', { | ||
objectID: "hit objectID", | ||
index: "my-index-name", | ||
queryID: "Algolia queryID", // required only for Click Analytics, | ||
// ... other required properties from the spec | ||
}) | ||
|
||
analytics.track('Order Completed', { | ||
index: "my-index-name", | ||
queryID: "Algolia queryID", // required only for Click Analytics, | ||
|
@@ -123,20 +112,4 @@ analytics.track('Order Completed', { | |
}) | ||
``` | ||
|
||
Track calls will be sent to Algolia as a `track` event, and appear in your Click Analytics, A/B Testing and Personalization dashboard. | ||
|
||
|
||
_**NOTE:** If you send anonymous activity to Algolia, it will not be connected to activity attributed to that same user once they are identified._ | ||
|
||
|
||
## Renaming Events | ||
|
||
If you are already sending events of which the names are out of the spec, you need to rename them for Algolia to understand correctly. It doesn't necessarily mean you need to modify your code. | ||
|
||
Go to the destination settings and click "Rename Events". | ||
|
||
 | ||
|
||
You can put your current event names on the left and the event names following the spec on the right. | ||
|
||
 | ||
> _**NOTE:** If you send anonymous activity to Algolia, it will not be connected to activity attributed to that same user once they are identified._ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we show a screenshot of where these items are in the Algolia Dashboard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep will add those in today! Makes a lot of sense to show where they're located