These steps should be completed in order to have Google Maps working correctly with eDirectory:



TABLE OF CONTENTS

  1. Creating/selecting a project on Google API Console
  2. Enabling Geocoding API and Maps JavaScript API
  3. Creating an API Key
        3.1. API Key for Google Maps
        3.2. API Key for Visitor Location Detection & Nearby Results
  4. Inserting the Maps API Key in the sitemgr
  5. Activating Google Maps/Linking a credit card to the Google Project
  6. How can I know if my new Key is working?


1- Creating/selecting a project on Google API Console

  1. While logged in with your Google Account, access the Google Cloud Platform's API Console

  2. Select a project or create a new one




  3. If you already have a project created, select it and go to step 2.

 

  1. If you don’t have a project yet, click on “New Project“ 

  2. Insert your Project name, location or folder, and click on “Create“.


  3. Now, select the project you want and click on “Open“. 



2- Enabling Geocoding API and Maps JavaScript API

  1. Go to "Library"

  2. Select  Maps “View All”

  3. Click on Geocoding API and Maps JavaScrip API

  4. Select “Enable” on both of them 



3- Creating an API Key

3.1- API Key for Google Maps

  1. Go back to the previous screen, click on Credentials > Create credentials > API key

  2. On the next screen, click on “Restrict Key“

  3. Now, give a name to your Key and add an HTTP referrer to restrict the key usage to your domain. Input all the variations for your website. Use the wildcard (*) to represent variations.

    E.g.:
    yourdomain.com/*


    https://yourdomain.com/*


    https://www.yourdomain.com/*

    Replace the "yourdomain.com" with your own domain info. Disregard the ”*” (asterisk) before the domain in the screenshot below. Configure it according to the examples above, please.

    Under 
    API restrictions, enable "Restrict key", then select both options that you have enabled before: “Geocoding API” and “Maps JavaScript API”. After that, click on Save


  4. You will be redirected to the following screen. Copy the key code by clicking on the "Copy API key" icon and go to step 4.

 


3.2- API Key for Visitor Location Detection & Nearby Results

  1. If you do not intend to use the Nearby Results feature, you may skip this step.

  2. On the APIs & Services dashboard, click on Credentials > Create credentials > API key

  3. On the next screen, click on “Restrict Key“

  4. Now, give a name to your Key and restrict it to the IP addresses that will be able to use the key. It is usually the IP of the server hosting your website.

    If your website is hosted on one of our shared servers, insert the following IPs:

    52.52.23.74
    52.9.39.107
    54.194.207.47

    If your website is self-hosted or hosted on a dedicated server and you do not know the IP address, please contact us at support@edirectory.com for further assistance.

    Under API restrictions, enable "Restrict key", then select both options that you have enabled before: “Geocoding API” and “Maps JavaScript API”. After that, click on Save.



  5. You will be redirected to the following screen. Copy the key code by clicking on the "Copy API key" icon and go back to your eDirectory.

  6.  On the sitemgr section Settings > Language & Geography > Visitor Location Detection & Nearby Results, insert the Google Api Key (Server Key) and click on "Save changes".



4- Inserting the Maps API Key in the sitemgr

  1. While logged in on your sitemgr, go to Settings > Google Integrations > Google Maps. Insert the code copied before, click on "Enable Google Maps", then click on “ Save Changes“ 

 


5- Activating Google Maps/Linking a credit card to the Google Project


Now, a credit card must be linked to the Google project in order for Google Maps to work correctly. Google only charges for significant traffic, but linking a billing account is mandatory.


Information about billing and pricing can be found at Google Maps Platform Billing and 

Google Platform Pricing.

 

  1. Access the Google API Console using the same Google account used to create the API Key

  2. Find for your project to make sure Billing will be enabled on the correct Google project


  3. Select your Project


  4. Open the side menu and click on Billing


  5. Select "LINK A BILLING ACCOUNT"

  6. You can choose an existing billing account or create a new one

 

6- How can I know if my new Key is working?

  1. On sitemgr, click on Settings > Basic Information, insert any information on the Address boxes and then click outside of the box, if a map was generated your API was configured correctly.


The most common error is related to not enabling Billing on the Google Cloud Project. Please refer to 
step 5 and check again. 



Note: If your API key was configured after creating a listing, it’s necessary to go to your listings and click on any boxes of address, then click outside of the box to generate the map, or just insert the address again.


If you have any questions, do not hesitate to contact us at support@edirectory.com