Installation - PromInc/organic-search-analytics GitHub Wiki

For those of you familiar with setting up a webserver and/or website, this might seem fairly straight forward. For those of you that this is a new process to, I assure you it's not that difficult if you choose to setup a locally hosted webserver via XAMPP or MAMP. Work through the installation guides those tools provide and you should have the hard part out of the way.

Other than that, it's copying files from this repository by downloading the code and configuring the API access to Google and Bing. That in it self can be a bit daunting, but I assure you that if you follow the below instructions you'll be up and running without issues soon!

  1. Setup a hosting environment. PHP (5.4.1+) and MySQL are required. This program can be run on a local machine - using XAMPP or MAMP works great for this configuration.
  2. Copy the repository to the new hosting environment.
  3. Within the new directory, create a directory named config.
  4. Add a MySQL Database. Any database name can be used, though organic-search-analytics is suggested.
  5. Import database structure. Using phpMyAdmin or other MySQL tools, import the file: organic-search-analytics/organic-search-analytics.sql
  6. Setup Google API Access
  7. Go to the Google Developers Console.
  8. Click the Create Project button
  9. Enter a name for this API access project, organic-search-analytics is suggested, and click the Create button
  10. In the left hand navigation, choose Credentials.
  11. Choose the oAuth consent screen tab across the top.
  12. Enter a product name - I suggest Organic Search Analytics.
  13. Click Save.
  14. Choose the Credentials tab across the top.
  15. Click Create credentials and choose OAuth client ID.
  16. Choose Web application. Enter a name - I suggest Organic Search Analytics. Click Create. Close the popup that displays.
  17. Click the Create credentials button and choose Service account key.
  18. For Service account choose Compute Engine default service account.
  19. Choose P12 and click the Create button. Click the Ok button to close the popup.
  20. A file should have downloaded automatically - copy that file to your webserver to the /config directory.
  21. Back on the Google Developer Console website, click on Manage service accounts. Copy the Service account ID (email address) and keep this handy - it's needed for step 7.IV and 8 below.
  22. Go back to the API Manager page for this project by clicking on the hamburger menu icon in the top left (three horizontal lines) and choosing API Manager.
  23. Ensure that your project name is listed at the top of the page. If not, click on it and change to your project name.
  24. Click on the Library menu option.
  25. In the search box, search for Google Search Console API and select the option named as such in the search results.
  26. Click the Enable button
  27. Grant access to Google Search Console.
  28. Log into Google Search Console
  29. For each site you wish to access data from, choose Manage property -> Add or remove users.
  30. Click ADD A NEW USER
  31. Enter the email address from step 6.xv in the User email field.
  32. Set the Permission dropdown to Full.
  33. Click the Add button.
  34. To grant access to other sites, click Search Console in the top left and repeat steps iii through vi, using the same email address in each step.
  35. Set configuration. Access the site on your web server and choose Settings -> Create Configuration File. Fill in the following fields and click Save Configuration.
  • Database Host = the domain name of the MySQL database connection. If you are using XAMPP or MAMP this will be localhost.
  • Database Username = the username to connect to the MySQL database. If you are using XAMPP or MAMP this will be root.
  • Database Password = the password to connect to the MySQL database. If you are using XAMPP or MAMP this will be root.
  • Database Name = the MySQL database name as defined in step 4.
  • OAuth 2.0 Email Address = the Google API Access email address from step 6.xv.
  • OAuth 2.0 P12 File Name = The file name of the P12 file (including the .p12 extension) from step 6.xiv.