Our Biggest Sale Is Here
Up to 70% Off
Get the Deal

How to set up the Google Maps API key for wpDataTables geo charts

Say you want a Google geo chart on your site that colors each country by the number of customers you have there. Google draws maps only for sites with their own Google Maps API key, so you create one in Google Cloud once and add it to wpDataTables. It takes about ten minutes, and you need a Google account with a payment method.

How do I create the API key?

Create or select a project in the Google Cloud console and create an API key in APIs & Services → Credentials.

  1. Choose a project. In the Google Cloud console, click the project list at the top left. Select a project, or click NEW PROJECT, enter a name such as Google Maps API Key, choose the location and click CREATE. For a company Google Workspace account, choose your organization as the location; for a personal account, choose No organization.
  2. Select it. When the project is ready, click SELECT PROJECT and check that it’s selected at the top.
  3. Open the credentials. Open the menu at the top left and go to APIs & Services → Credentials.
  4. Create the key. Click + CREATE CREDENTIALS and choose API key. Copy the key from the window that opens and keep it somewhere safe.

Which APIs do I need to turn on?

Turn on the Maps JavaScript API and the Geocoding API in the API library of the same project. Google asks for billing details for each.

  1. Open the library. In APIs & Services, click Library in the menu on the left.
  2. Turn on Maps JavaScript API. Search for Maps JavaScript API, open the first result and click Enable.
  3. Add billing. Choose your country, accept the Terms of Service, and select or create a payment profile with a credit or debit card.
  4. Turn on Geocoding API. Go back to the library, search for Geocoding API and enable it the same way, with the same billing details.

How do I limit the key to my website?

Edit the key in APIs & Services → Credentials and allow only your website, so nobody else can use your key.

  1. Open the key. In APIs & Services → Credentials, click the API key.
  2. Choose websites. Under Set an application restriction, choose Websites and click ADD.
  3. Add your site. Enter your domain without http:// or https://, for example example.com, and click Done.
  4. Save the key. Scroll down and click Save.

How do I add the key to wpDataTables?

Paste the key in wpDataTables → Settings → Charts and click Validate & Save. You can now create Google geo charts in the chart wizard.

What should I remember about the Google Maps API key?

Create an API key in a Google Cloud project, turn on the Maps JavaScript API and the Geocoding API with billing details, limit the key to your website, and paste it in wpDataTables → Settings → Charts with Validate & Save. Google geo charts then work on your site.

Wait, Before You Download!

To get your hands on wpDataTables Lite, please enter your email address below. We’ll send you a direct download link and keep you updated on existing features along with helpful tips and tricks!

By continuing, I accept Privacy Policy and T&C
Mail Box