Skip to content
Open
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
31 changes: 31 additions & 0 deletions plugins/GoogleSearchConsole/v1/dataStreams/countryBreakdown.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "countryBreakdown",
"displayName": "Country breakdown",
"description": "Returns search performance metrics grouped by country",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"postBody": {
"startDate": "{{new Date(timeframe.start).toISOString().split('T')[0]}}",
"endDate": "{{new Date(timeframe.end).toISOString().split('T')[0]}}",
"dimensions": [
"country"
],
"rowLimit": 25000,
"dataState": "final"
},
"postRequestScript": "postRequest/countryBreakdown.js",
"getArgs": [],
"headers": []
},
"providesPluginDiagnostics": true,
"timeframes": true,
"tags": []
}
31 changes: 31 additions & 0 deletions plugins/GoogleSearchConsole/v1/dataStreams/deviceBreakdown.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "deviceBreakdown",
"displayName": "Device breakdown",
"description": "Returns search performance metrics grouped by device type",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"postBody": {
"startDate": "{{new Date(timeframe.start).toISOString().split('T')[0]}}",
"endDate": "{{new Date(timeframe.end).toISOString().split('T')[0]}}",
"dimensions": [
"device"
],
"rowLimit": 25000,
"dataState": "final"
},
"postRequestScript": "postRequest/deviceBreakdown.js",
"getArgs": [],
"headers": []
},
"providesPluginDiagnostics": true,
"timeframes": true,
"tags": []
}
59 changes: 59 additions & 0 deletions plugins/GoogleSearchConsole/v1/dataStreams/pageDistribution.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "pageDistribution",
"displayName": "Page distribution",
"description": "Returns a distribution of queries by search ranking position for the selected page",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"getArgs": [],
"headers": [],
"postBody": {
"startDate": "{{new Date(timeframe.start).toISOString().split('T')[0]}}",
"endDate": "{{new Date(timeframe.end).toISOString().split('T')[0]}}",
"dimensions": [
"query"
],
"dimensionFilterGroups": [
{
"filters": [
{
"dimension": "page",
"operator": "equals",
"expression": "{{scope?.[0]?.name}}"
}
]
}
],
"rowLimit": 25000
},
"postRequestScript": "postRequest/pageDistribution.js"
},
"providesPluginDiagnostics": true,
"timeframes": true,
"tags": [],

"ui": [
{
"name": "scope",
"objectLimit": 1,
"label": "Scope",
"type": "objects",
"matches": {
"sourceType": {
"type": "equals",
"value": "gsc-page"
}
},
"validation": {
"required": true
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "pagePerformanceOverTime",
"displayName": "Page performance over time",
"description": "Returns daily clicks, impressions and CTR trends for the selected page",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"postBody": {
"startDate": "{{new Date(timeframe.start).toISOString().split('T')[0]}}",
"endDate": "{{new Date(timeframe.end).toISOString().split('T')[0]}}",
"dimensions": [
"date"
],
"dimensionFilterGroups": [
{
"filters": [
{
"dimension": "page",
"operator": "equals",
"expression": "{{scope?.[0]?.name}}"
}
]
}
],
"rowLimit": 25000
},
"postRequestScript": "postRequest/pagePerformanceOverTime.js",
"getArgs": [],
"headers": []
},
"providesPluginDiagnostics": true,
"timeframes": true,
"tags": [],

"ui": [
{
"name": "scope",
"objectLimit": 1,
"label": "Scope",
"type": "objects",
"matches": {
"sourceType": {
"type": "equals",
"value": "gsc-page"
}
},
"validation": {
"required": true
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "pagePerformanceSummary",
"displayName": "Page performance summary",
"description": "Returns performance metrics for a given page",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"getArgs": [],
"headers": [],
"postBody": {
"startDate": "{{new Date(timeframe.start).toISOString().split('T')[0]}}",
"endDate": "{{new Date(timeframe.end).toISOString().split('T')[0]}}",
"dimensions": [
"page"
],
"dimensionFilterGroups": [
{
"filters": [
{
"dimension": "page",
"operator": "equals",
"expression": "{{scope?.[0]?.name}}"
}
]
}
],
"rowLimit": 25000
},
"postRequestScript": "postRequest/script1.js"
},
"providesPluginDiagnostics": true,
"timeframes": true,
"tags": [],

"ui": [
{
"name": "scope",
"objectLimit": 1,
"label": "Scope",
"type": "objects",
"matches": {
"sourceType": {
"type": "equals",
"value": "gsc-page"
}
},
"validation": {
"required": true
}
}
]
}
30 changes: 30 additions & 0 deletions plugins/GoogleSearchConsole/v1/dataStreams/pageUrLs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "pageUrLs",
"displayName": "Page URLs",
"description": "Returns a list off URLs with impressions in the last year",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look quite right - the timeframe is 'now -> whatever end date selected in SquaredUp'

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This stream is used for object discovery / indexing where I wanted to pull pages seen in the last year regardless of the dashboard timeframe (the API always requires a startDate and endDate)

You reckon I need to update it somehow or is it okay for that?

"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"postBody": {
"startDate": "{{new Date(Date.now() - 365 * 24 * 60 * 60 * 1000).toISOString().split('T')[0]}}",
"endDate": "{{new Date().toISOString().split('T')[0]}}",
"dimensions": [
"page"
],
"rowLimit": 25

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do this or other streams need paging configured?

@Daniel-Hodgson-SquaredUp Daniel-Hodgson-SquaredUp Jun 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't need explicit paging but I definitively need to check the rowLimit configs, for one this stream should be way higher than 25!

},
"postRequestScript": "postRequest/pageUrLs.js",
"getArgs": [],
"headers": []
},
"timeframes": false,
"providesPluginDiagnostics": true,
"tags": []
}
30 changes: 30 additions & 0 deletions plugins/GoogleSearchConsole/v1/dataStreams/pages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "pages",
"displayName": "Pages",
"description": "Returns a complete list of pages with performance metrics",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"postBody": {
"startDate": "{{new Date(timeframe.start).toISOString().split('T')[0]}}",
"endDate": "{{new Date(timeframe.end).toISOString().split('T')[0]}}",
"dimensions": [
"page"
],
"rowLimit": 25000
},
"postRequestScript": "postRequest/pages.js",
"getArgs": [],
"headers": []
},
"providesPluginDiagnostics": true,
"timeframes": true,
"tags": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "previousPeriodPagePerformance",
"displayName": "Previous period page performance",
"description": "Returns a summary of performance for the previous period of a given timeframe for the selected page",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"getArgs": [],
"headers": [],
"postBody": {
"startDate": "{{new Date(new Date(timeframe.start).getTime() - (new Date(timeframe.end).getTime() - new Date(timeframe.start).getTime()) - 86400000).toISOString().split('T')[0]}}",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't quite get my head around what happens if selected yearly ranges or something here - do we need to restrict the available timeframes?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think we need to restrict timeframes, as the calculation should work within 1 day error - I guess the main consideration is performance but I've not been able to test with a large dataset (and GSC data has a max query timeframe of 16 months)

"endDate": "{{new Date(new Date(timeframe.start).getTime() - 86400000).toISOString().split('T')[0]}}",
"dimensions": ["page"],
"dimensionFilterGroups": [
{
"filters": [
{
"dimension": "page",
"operator": "equals",
"expression": "{{scope?.[0]?.name}}"
}
]
}
],
"rowLimit": 25000
},
"postRequestScript": "postRequest/script1.js"
},
"timeframes": true,
"providesPluginDiagnostics": true,
"tags": [],
"visibility": {
"type": "hidden"
},
"ui": [
{
"name": "scope",
"objectLimit": 1,
"label": "Scope",
"type": "objects",
"matches": {
"sourceType": {
"type": "equals",
"value": "gsc-page"
}
},
"validation": {
"required": true
}
}
]
}
Loading
Loading