How to create Google Maps API key for GeoIP plugin

Quick navigation

If you would like to use the GeoIP feature you must get a Maps API key from Google. Additionally, billing must be enabled for the project associated with the API key. This guide will explain how to set up the project, enable billing, and generate an API key. Once you are done you can then enter the key to the GeoIP plugin configuration and display your online visitors on the map.

Create a Google Cloud Platform project

Assuming you already have a Google account and are logged into it, access the Google Cloud Platform Console Dashboard. Accept the initial terms of service and in the Dashboard, click on "Create project". Name the project and click on "Create".

Enable Maps JavaScript API and generate a new API key

When you have the project created, you need to add Google Maps Javascript API to it. Navigate to APIs & Services > Library, search for and enable the "Maps JavaScript API".

 

After enabling the Maps JavaScript API, navigate to the Credentials section and create a new API key. A new API key will be generated in a few moments. This key needs to be inserted into the GeoIP plugin configuration.

It is not mandatory but highly recommended to restrict the key to prevent unauthorized use. Therefore we will cover restricting the key in the next step as well.

Restrict the API key (optional)

Restricting the key prevents unauthorized use, even if someone retrieves it somehow. To restrict the key, choose the "HTTP referrers (web sites) option from the "Application restriction" section, and add your LiveAgent URL, e.g., mycompany.ladesk.com, as a new item.

You can always review and secure your API keys from the APIs & Services > Credentials section.

Enable billing for your project

Google requires that billing must be enabled for the project associated with the API key. Navigate to the Billing section and click on the "Link Billing Account" option to enable billing for your project. You will be asked to enter your personal/company data and credit/debit card information.

Enable Geocoding API (optional)

If you want to display the Google map in customer's contact details, it is also required to enable the Geocoding API. Navigate to APIs & Services > Library, search for it, and activate it. It's not needed to create a new API key once again. Both the Maps JavaScript API and Geocoding API will be used together by default.

You can always review and revoke APIs from APIs & Services > Dashboard.

×