-
Notifications
You must be signed in to change notification settings - Fork 4
Add Algolia plugin #67
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1bb21ff
Add Algolia plugin
andrewmumblebee bf3bee8
Update Algolia icon
andrewmumblebee f4724ba
tweak algolia icon alignment
andrewmumblebee 2eb7ac7
fix algoliaIndex tile sizing and placement
andrewmumblebee 25cca2b
Swap baseUrl for Algolia plugin dataStreams to reduce duplication
andrewmumblebee 6ef8027
Remove test edits and add tags
andrewmumblebee e4473e5
Rename Algolia sourceType to Index as per guidelines
andrewmumblebee 24ddd4e
Add algolia codeowner
andrewmumblebee d072d87
Update object types
andrewmumblebee d83f3fe
Add scripts to include index in scoped dataStreams
andrewmumblebee a0607bc
Rework overview dashboard
andrewmumblebee f1c6431
Rename index perspective
andrewmumblebee d77d1d2
fix Claude review comments
andrewmumblebee a547e1e
Add additional Algolia dataStreams
andrewmumblebee d6226ed
update index dashboard to show kpis
andrewmumblebee fc610dc
Ensure dataStreams add index metadata
andrewmumblebee d5395f8
hide index column from table
andrewmumblebee 0aac855
Review tweaks for Algolia plugin
andrewmumblebee cb04e20
fix inconsistent spacing
andrewmumblebee 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
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
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 |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "steps": [ | ||
| { | ||
| "displayName": "Authenticate", | ||
| "dataStream": { "name": "indexes" }, | ||
| "required": true, | ||
| "error": "Could not connect to Algolia. Check your Application ID is correct and that your API key has the 'listIndexes' ACL (a Search-Only key will not work).", | ||
| "success": "Connected to Algolia." | ||
| } | ||
| ] | ||
| } | ||
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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [ | ||
| { | ||
| "name": "Index", | ||
| "sourceType": "Index", | ||
| "icon": "magnifying-glass", | ||
| "singular": "Index", | ||
| "plural": "Indices" | ||
| } | ||
| ] |
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 |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| { | ||
| "name": "clickThroughRate", | ||
| "displayName": "Click-through Rate", | ||
| "description": "Retrieves the click-through rate (CTR) for all your searches with at least one click event", | ||
| "tags": ["Analytics"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/2/clicks/clickThroughRate", | ||
| "getArgs": [ | ||
| { "key": "index", "value": "{{object.rawId}}" }, | ||
| { | ||
| "key": "startDate", | ||
| "value": "{{timeframeUtc.start.split('T')[0]}}" | ||
| }, | ||
| { | ||
| "key": "endDate", | ||
| "value": "{{timeframeUtc.end.split('T')[0]}}" | ||
| } | ||
| ], | ||
| "postRequestScript": "datesAddIndex.js", | ||
| "paging": { "mode": "none" } | ||
| }, | ||
| "matches": { "sourceType": { "type": "equals", "value": "Index" } }, | ||
| "metadata": [ | ||
| { | ||
| "name": "index", | ||
| "displayName": "Index", | ||
| "shape": "string", | ||
| "role": "id" | ||
| }, | ||
| { | ||
| "name": "date", | ||
| "displayName": "Date", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "rate", | ||
| "displayName": "Click-through Rate", | ||
| "shape": ["percent", { "asZeroToOne": true, "decimalPlaces": 0 }], | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "clickCount", | ||
| "displayName": "Click Count", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| }, | ||
| { | ||
| "name": "trackedSearchCount", | ||
| "displayName": "Tracked Search Count", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| } | ||
| ], | ||
| "timeframes": true | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| { | ||
| "name": "conversionRate", | ||
| "displayName": "Conversion Rate", | ||
| "description": "Retrieves the conversion rate (CR) for all your searches with at least one conversion event", | ||
| "tags": ["Analytics"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/2/conversions/conversionRate", | ||
| "getArgs": [ | ||
| { "key": "index", "value": "{{object.rawId}}" }, | ||
| { | ||
| "key": "startDate", | ||
| "value": "{{timeframeUtc.start.split('T')[0]}}" | ||
| }, | ||
| { | ||
| "key": "endDate", | ||
| "value": "{{timeframeUtc.end.split('T')[0]}}" | ||
| } | ||
| ], | ||
| "postRequestScript": "datesAddIndex.js", | ||
| "paging": { "mode": "none" } | ||
| }, | ||
| "matches": { "sourceType": { "type": "equals", "value": "Index" } }, | ||
| "metadata": [ | ||
| { | ||
| "name": "index", | ||
| "displayName": "Index", | ||
| "shape": "string", | ||
| "role": "id" | ||
| }, | ||
| { | ||
| "name": "date", | ||
| "displayName": "Date", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "rate", | ||
| "displayName": "Conversion Rate", | ||
| "shape": ["percent", { "asZeroToOne": true, "decimalPlaces": 0 }], | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "conversionCount", | ||
| "displayName": "Conversion Count", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| }, | ||
| { | ||
| "name": "trackedSearchCount", | ||
| "displayName": "Tracked Search Count", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| } | ||
| ], | ||
| "timeframes": true | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "name": "indexes", | ||
| "displayName": "Indices", | ||
| "description": "Algolia indices in the application, with record counts, sizes, last build time and pending tasks", | ||
| "tags": ["Indices"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "baseUrl": "https://{{dataSource.applicationId}}.algolia.net", | ||
| "httpMethod": "get", | ||
| "endpointPath": "/1/indexes", | ||
| "pathToData": "items", | ||
| "paging": { "mode": "none" } | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { "name": "name", "displayName": "Index", "role": "label" }, | ||
| { | ||
| "name": "entries", | ||
| "displayName": "Records", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| }, | ||
| { | ||
| "name": "dataSize", | ||
| "displayName": "Data Size", | ||
| "shape": ["bytes", { "thousandsSeparator": true }] | ||
| }, | ||
| { | ||
| "name": "fileSize", | ||
| "displayName": "File Size", | ||
| "shape": ["bytes", { "thousandsSeparator": true }] | ||
| }, | ||
| { | ||
| "name": "lastBuildTimeS", | ||
| "displayName": "Last Build Time", | ||
| "shape": ["seconds", { "thousandsSeparator": true }] | ||
| }, | ||
| { | ||
| "name": "numberOfPendingTasks", | ||
| "displayName": "Pending Tasks", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| }, | ||
| { | ||
| "name": "pendingTask", | ||
| "displayName": "Has Pending Task", | ||
| "shape": "boolean" | ||
| }, | ||
| { "name": "updatedAt", "displayName": "Last Updated", "shape": "date" }, | ||
| { | ||
| "name": "primary", | ||
| "displayName": "Primary Index", | ||
| "shape": "boolean" | ||
| } | ||
| ], | ||
| "timeframes": false | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| { | ||
| "name": "noResultRate", | ||
| "displayName": "No-Result Rate", | ||
| "description": "Daily proportion of searches returning no results for an index", | ||
| "tags": ["Analytics"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/2/searches/noResultRate", | ||
| "getArgs": [ | ||
| { "key": "index", "value": "{{object.rawId}}" }, | ||
| { | ||
| "key": "startDate", | ||
| "value": "{{timeframeUtc.start.split('T')[0]}}" | ||
| }, | ||
| { "key": "endDate", "value": "{{timeframeUtc.end.split('T')[0]}}" } | ||
| ], | ||
| "postRequestScript": "datesAddIndex.js" | ||
| }, | ||
| "matches": { "sourceType": { "type": "equals", "value": "Index" } }, | ||
| "metadata": [ | ||
| { | ||
| "name": "index", | ||
| "displayName": "Index", | ||
| "shape": "string", | ||
| "role": "id" | ||
| }, | ||
| { | ||
| "name": "date", | ||
| "displayName": "Date", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "rate", | ||
| "displayName": "No-result rate", | ||
| "shape": ["percent", { "asZeroToOne": true, "decimalPlaces": 0 }], | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "count", | ||
| "displayName": "Searches", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| }, | ||
| { | ||
| "name": "noResultCount", | ||
| "displayName": "No-result searches", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| } | ||
| ], | ||
|
andrewmumblebee marked this conversation as resolved.
|
||
| "timeframes": true | ||
| } | ||
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 |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| { | ||
| "name": "noResultSearches", | ||
| "displayName": "Top Searches With No Results", | ||
| "description": "Most frequent searches that returned no results for an index", | ||
| "tags": ["Analytics"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/2/searches/noResults", | ||
| "getArgs": [ | ||
| { "key": "index", "value": "{{object.rawId}}" }, | ||
| { | ||
| "key": "startDate", | ||
| "value": "{{timeframeUtc.start.split('T')[0]}}" | ||
| }, | ||
| { "key": "endDate", "value": "{{timeframeUtc.end.split('T')[0]}}" }, | ||
| { "key": "limit", "value": "50" } | ||
| ], | ||
| "postRequestScript": "searchAddIndex.js", | ||
| "paging": { "mode": "none" } | ||
| }, | ||
| "matches": { "sourceType": { "type": "equals", "value": "Index" } }, | ||
| "metadata": [ | ||
| { | ||
| "name": "index", | ||
| "displayName": "Index", | ||
| "shape": "string", | ||
| "role": "id" | ||
| }, | ||
| { | ||
| "name": "search", | ||
| "displayName": "Search", | ||
| "shape": "string", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "count", | ||
| "displayName": "Count", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| }, | ||
| { | ||
| "name": "withFilterCount", | ||
| "displayName": "With filters", | ||
| "shape": ["number", { "decimalPlaces": 0 }] | ||
| } | ||
| ], | ||
| "timeframes": true | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // Add the index name to allow grouping | ||
| var object = context.objects[0]; | ||
| result = | ||
| data?.dates?.map((r) => ({ | ||
| ...r, | ||
| index: object.rawId, | ||
| })) ?? []; | ||
|
|
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // Add the index name to allow grouping | ||
| var object = context.objects[0]; | ||
| result = | ||
| data?.searches?.map((r) => ({ | ||
| ...r, | ||
| index: object.rawId, | ||
| })) ?? []; | ||
|
|
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // Add the index name to allow grouping | ||
| var object = context.objects[0]; | ||
| result = | ||
| data?.countries?.map((r) => ({ | ||
| ...r, | ||
| index: object.rawId, | ||
| })) ?? []; | ||
|
|
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 |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "name": "searchCount", | ||
| "displayName": "Search Count", | ||
| "description": "Daily number of searches for an index over the selected timeframe", | ||
| "tags": ["Analytics"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "/2/searches/count", | ||
| "getArgs": [ | ||
| { "key": "index", "value": "{{object.rawId}}" }, | ||
| { | ||
| "key": "startDate", | ||
| "value": "{{timeframeUtc.start.split('T')[0]}}" | ||
| }, | ||
| { "key": "endDate", "value": "{{timeframeUtc.end.split('T')[0]}}" } | ||
| ], | ||
| "postRequestScript": "datesAddIndex.js" | ||
| }, | ||
| "matches": { "sourceType": { "type": "equals", "value": "Index" } }, | ||
| "metadata": [ | ||
| { | ||
| "name": "index", | ||
| "displayName": "Index", | ||
| "shape": "string", | ||
| "role": "id" | ||
| }, | ||
| { | ||
| "name": "date", | ||
| "displayName": "Date", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "count", | ||
| "displayName": "Searches", | ||
| "shape": ["number", { "decimalPlaces": 0 }], | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "pattern": ".*" | ||
| } | ||
| ], | ||
| "timeframes": true | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.