1. Home
  2. Knowledge Base
  3. Importing Data
  4. [Online] – How to import data from the Search Console API

How to Import Data from the Search Console API

The Search Console API connector in Analytics Canvas Online is designed to retrieve all available data from one or more properties.  

To extract your data, you will need to make individual queries for each data category and result set you would like to have.  Once you have made your queries, in order to keep your datasets up to date, you will automate the Canvas that the datasets are in.  

Connecting to the Search Console API in Analytics Canvas

1. Drag and drop the “Search Console” on the block and a window will appear. If this is the first time you’ve added this block, you will have to add an account - click on “Add a new credential.”

 

Google Search Console connector

2. You will be redirected to Google and you’ll have to click on the account that owns the Google Search Data you want to process.

 

Google Search Console connector2

3. In the next step you will have to check the last box in the list to allow Analytics Canvas access to your Search Console data. Once you do, click “Continue.”

 

Google Search Console connector3

4. Now you will land back in Analytics Canvas and you’ll have the credential listed. Check the box next to the credential and then click on “Next Step” in the top right corner.

 

Google Search Console connector4

Defining the Query

5. At this step you will have to define the query you are going to use to pull the data out of Search Console using the options available in the first column called “Dimensions.”

 

Google Search Console connector5

6. On the second column, the first option is “Search Type” which is a dropdown menu with the same available options as in the Search Console interface.

 

Google Search Console connector6

7. The second option is called “Aggregation Type.”

 

Google Search Console connector7

Adding a Filter to the API calls

8. Next you have the option to add an extra filter if you want to further segment your data - click on “Add Filter.”

 

Google Search Console connector8

9. A pop-up will appear that will have three different fields - Dimension, Operation and Expression. If you click on the “Dimension” dropdown menu, you will see the same options as in the query builder. For example you can use pages in the builder and use this to filter by queries.

 

Google Search Console connector9

10. The “Operation” dropdown contains the same filters as the ones in the Google Search Console interface and works in the same way.

 

Google Search Console connector10

11. The third one, “Expression,” is the one where you type the expression you want to use in relation to the previous two choices. For example, if you only want to see the pages containing “data-studio” in the URL  you select “Page” from the first dropdown, “Contains” from the second and type “data-studio” in the last field. When you’re done, click on “Created” at the bottom right corner.

 

Google Search Console connector11

12. The newly created filter will appear under the “Add Filter” button and each one you create will be added there. At the end of each row you have the “Delete” button if you want to delete that particular filter.

 

Google Search Console connector12

Preview results before extracting data

13. When you’re done building the query, you can preview the data to make sure that you’re pulling out the correct data out of Google Search Console. Clicking on “Preview” in the bottom left corner will show sample data from the query you just created.

 

Google Search Console connector13

14. If the data in the preview table looks good, click on “Next Step” to move to the last section of the query builder.

 

Google Search Console connector14

Naming the Table and Defining the Date Load Settings 

15. In the last step, you can add a name and the description of the block. We recommend you add something suggestive so that you can quickly identify the query each block uses just by looking at its name.

 

Google Search Console connector15

16. Below the description you can edit the query’s date range. By default it will automatically pull data for the last 30 days. If you want to edit it, click on the pencil icon.

 

Google Search Console connector16

17. A pop-up will appear with the default setting visible. If you click on the dropdown, you’ll see there are multiple options available.

 

Google Search Console connector17

18. For example, if you want to pull the data for a specific period, select “Fixed date range” from the dropdown and then use the calendar to select the start and end dates. Click “Ok” when you are finished.

 

Google Search Console connector18

Running the Query

19. Now all you have to do is to click on “Next Step: Submit” to finish creating the query and start getting Search Console data into Analytics Canvas.

 

Google Search Console connector19

20. The block will appear on the canvas and it will show as loading while the query is running. When it finishes, it will show the number of rows above the exit stub.

 

Google Search Console connector20

Standard Block Controls

Block name - you have to click on it and use the small pop-up to change the block’s name.

Block comments tab - you can add comments about changes you made, giving you an edit history and traceability while helping your collaborators to understand your work in the block.

Nodes: if you click on any node, you will see three tabs: Data, Data Profiler, and Stub SQL. 

Data:  Here you will see the number of rows in the dataset at that node.  You can page through the data using the pan and scroll controls.  You can export the data at this node to a file either as a plain CSV or compressed with gzip. 

Data Profiler: If you click on “Data Profiler,” you will see the option to add columns. 

Stub SQL -. This will show you the SQL statement used to generate the data at that specific node. Right-click on any Node to get additional controls or for shortcuts. 

 

Image

Column Definitions: this will show a list of columns and their related data types. 

You can connect any number of blocks to the outputs of each block.  

Block Error Icon: 

Image

If you see the triangle with a “!” in it, click on it to see the warning message. 

Was this article helpful?

Related Tutorials/Video