Skip to main content

How to set up Google Search Keywords import

Step 1: Create a Google Search Console account

To import your Google Search Keywords in Ghost Metrics, you need to sign in to the Google Search Console and check your website is verified. Follow the steps below:

  1. Sign in to Google Search Console (you may need to create an account). Google Search Console is a free service offered by Google that helps you monitor and maintain your site’s presence in Google Search results.
  2. After signing in, you can add a property from the option located in the top left. You will then be presented with two options: Domain or URL prefix. (If you have created a new account, you will instead be presented with the below options right away)
note

Domain: This option includes all subdomains (e.g., m., www.) and multiple protocols (e.g., http, https, ftp). It covers a broader scope of your website.

URL Prefix: This option includes only URLs with the specified prefix, including the protocol (e.g., http/https). It focuses on a specific subset of your website’s URLs.

Google Search Console property options

Choose the option that accurately reflects your website by entering either the domain or URL. Once you’ve made your selection, you will receive specific instructions on how to verify your chosen domain. The verification method will vary depending on the option you have chosen.

The verification process may involve adding a DNS record to your domain name or uploading an HTML file to your web hosting. Follow the provided instructions accordingly.

Once your website is verified: Congratulations!

Step 2: Create a Google Search Console API project

Important note before we start: At no point during these steps will you be required to submit your ‘app’ to Google for verification. If you are prompted to submit your ‘app’ and do not have the option to click no or cancel, then please review the steps in this guide again to ensure that you have not missed an important step, or added additional information where not necessary.

If at any time you need to make changes to the OAuth Configuration, you will need to download the new OAuth Client credentials and upload them to Ghost Metrics in order for the changes to work.

Follow these steps to get your OAuth Client Config and use the Ghost Metrics Google Search Integration:

  1. Sign in to the Google API Console.
  2. Click Select a project in the menu.
    Select a project
  3. To create a new project click the “New Project” button in the overlay:
    New Project
  4. Give your new Project a useful name (for example Ghost Metrics Search Keywords).
    New Project
  5. After your project has been created, select it manually in the project list and click “open”.
    New Project
  6. Click on Library in the menu on the left, then search for Google Search Console API, and click on the item Google Search Console API. Then on the description page of this API, click the Enable button.
    New Project
  7. Next we need to set up the OAuth Consent Screen. Click on Menu icon next to the Google logo at the top and navigate to APIs & Services > OAuth Consent Screen in the left menu.
    google_api_consent_screen.png
  8. Choose a name for your app (for example Ghost Metrics Integration), then click Next.
    google_api_consent_screen_2.png
  9. Next, you will need to select External and click Next.
    google_api_consent_screen_3.png
  10. Enter your email address in the Contact Information field and click Next.
    google_api_consent_screen_4.png
  11. Agree to the Google API Serivces User Data Policy and click Create.
    google_api_consent_screen_5.png
  12. You will be taken to the OAuth overview page. Click Create OAuth Client
    google_api_consent_screen_6.png
  13. Select Web Application as the Application Type.
  14. Set a name for the application, for example Ghost Metrics.
  15. Click on Add URI under Authorized JavaScript origins and set it to your Ghost Metrics URL domain for example: https://example.ghostmetrics.cloud
  16. Click on Add URI under Authorized redirect URIs. This needs to be set to your Ghost Metrics URL with this special URL/query /index.php?module=SearchEngineKeywordsPerformance&action=processAuthCode added at the end. For example: https://example.ghostmetrics.cloud/index.php?module=SearchEngineKeywordsPerformance&action=processAuthCode.
    google_api_consent_screen_7.png
  17. Once you have entered the two URIs, click Create to finish creating the OAuth Client Credentials.
  18. You will now be presented with the OAuth credentials that were just created. Click on Download JSON to download the OAuth credentials.
    google_api_consent_screen_8.png

Step 3: Upload the OAuth Client Credentials to Ghost Metrics

  1. Log in to your Ghost Metrics instance.
  2. Click on the Settings (gear) icon in the top right of the screen.
  3. Click on System > Search Performance in the left menu.
  4. Under Google Search Console, click on the Setup Configuration button. google_api_consent_screen_9.png
  5. Click on the Upload button and select the JSON file you downloaded in the previous step.

The steps in creating your OAuth Client Configuration are now complete. The ‘app’ that has been created during this process can remain as a ‘Testing’ or ‘Test Phase’ app without any need to submit it for review.

At no point during these steps would you have been required to submit your ‘app’ to Google for verification. If were prompted to submit your ‘app’ and did not have the option to click no or cancel, then please review the steps in this guide again to ensure that you have not missed an important step, or added additional information where not necessary.

Step 4: Authorize the app

  1. Click on the Start OAuth Process button in the Google Search Console settings page.
  2. You will be redirected to the Google login page. Sign in with the Google account that has access to the Google Search Console property you want to import.
  3. You will be asked to authorize the app to access your Google Search Console data. Click on the Allow button.
  4. You will be redirected back to the Ghost Metrics settings page. You should see a success message indicating that the app has been authorized.