Report Parameters - PromInc/organic-search-analytics GitHub Wiki
The reporting feature of this tool is of course very valuable as it allows you to visualize your data.
The user interface has been designed to provide you with all of the features available and thus allow you to access and see your data as needed.
For those that wish to implement custom programmatic methods to this tool, the following parameter list is your reference for how to create custom reports.
To make a programmatic request for a report, send a request to report-custom.php
with the following parameters set.
Parameter | Req. | Format | Values | Notes |
---|---|---|---|---|
domain | Yes | string | A URL exactly corresponding Google Search Console and/or Bing Webmaster Tools. | URL encoded. |
query | No | string | A specific keyword query you wish to base the report on. | URL encoded. |
queryMatch | No | string | broad,exact | How to match the query to the values in the database. |
search_type | No | string | ALL,web,image,video | The type of search page the impression was found on. Only Google data can be broken down by these values - Bing does not offer this differentiation in their API data and will thus always be labeled as ALL. |
device_type | No | string | ALL,desktop,mobile,tablet | The type of device the user was on when the impression was recorded. Only Google data can be broken down by these values - Bing does not offer this differentiation in their API data and will thus always be labeled as ALL. |
date_type | Yes | string | hard_set, recent_# | hard_set uses the dates given in the date_start and date_end fields. If set to recent_# where # is any number, the report will end on the most recent date found in the database and go back # days from that date. This allow for reports like past 7 days. |
date_start | No | YYYY-MM-DD | Start date for report. | If not set, the latest date found in the database will be used. |
date_end | No | YYYY-MM-DD | End date for report. | If not set, the most recent date found in the database will be used. |
sortBy | No | string | date,query,impression,avgpos,ctr | Column used for sorting the report. |
sortDir | No | asc,desc | Direction to sort the report data. | |
granularity | No | day,week,month,year |
NOTE: Options under the values
column listed in bold are the default option that will be used if not set in the request.