Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ plugins/TransportForLondon/* @clarkd
plugins/UniFi/* @adamkinniburgh
plugins/UptimeRobot/* @kieranlangton
plugins/WorldCup2026/* @TimWheeler-SQUP
plugins/Algolia/* @andrewmumblebee


# Fallback – if a plugin has no specified author
Expand Down
11 changes: 11 additions & 0 deletions plugins/Algolia/v1/configValidation.json
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."
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
]
}
9 changes: 9 additions & 0 deletions plugins/Algolia/v1/custom_types.json
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"
}
]
56 changes: 56 additions & 0 deletions plugins/Algolia/v1/dataStreams/clickThroughRate.json
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
}
56 changes: 56 additions & 0 deletions plugins/Algolia/v1/dataStreams/conversionRate.json
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
}
55 changes: 55 additions & 0 deletions plugins/Algolia/v1/dataStreams/indexes.json
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
}
52 changes: 52 additions & 0 deletions plugins/Algolia/v1/dataStreams/noResultRate.json
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 }]
}
],
Comment thread
andrewmumblebee marked this conversation as resolved.
"timeframes": true
}
48 changes: 48 additions & 0 deletions plugins/Algolia/v1/dataStreams/noResultSearches.json
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
}
8 changes: 8 additions & 0 deletions plugins/Algolia/v1/dataStreams/scripts/datesAddIndex.js
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,
})) ?? [];

8 changes: 8 additions & 0 deletions plugins/Algolia/v1/dataStreams/scripts/searchAddIndex.js
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,
})) ?? [];

8 changes: 8 additions & 0 deletions plugins/Algolia/v1/dataStreams/scripts/topCountries.js
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,
})) ?? [];

45 changes: 45 additions & 0 deletions plugins/Algolia/v1/dataStreams/searchCount.json
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
}
Loading
Loading