-
Notifications
You must be signed in to change notification settings - Fork 19
Installation
PromInc edited this page Mar 5, 2017
·
4 revisions
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!
- 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.
- Copy the repository to the new hosting environment.
- Within the new directory, create a directory named
config
. - Add a MySQL Database. Any database name can be used, though organic-search-analytics is suggested.
- Import database structure. Using phpMyAdmin or other MySQL tools, import the file: organic-search-analytics/organic-search-analytics.sql
- Setup Google API Access
- Go to the Google Developers Console.
- Click the Create Project button
- Enter a name for this API access project, organic-search-analytics is suggested, and click the Create button
- In the left hand navigation, choose Credentials.
- Choose the oAuth consent screen tab across the top.
- Enter a product name - I suggest Organic Search Analytics.
- Click Save.
- Choose the Credentials tab across the top.
- Click Create credentials and choose OAuth client ID.
- Choose Web application. Enter a name - I suggest Organic Search Analytics. Click Create. Close the popup that displays.
- Click the Create credentials button and choose Service account key.
- For Service account choose Compute Engine default service account.
- Choose P12 and click the Create button. Click the Ok button to close the popup.
- A file should have downloaded automatically - copy that file to your webserver to the /config directory.
- 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.
- 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.
- Ensure that your project name is listed at the top of the page. If not, click on it and change to your project name.
- Click on the Library menu option.
- In the search box, search for Google Search Console API and select the option named as such in the search results.
- Click the Enable button
- Grant access to Google Search Console.
- Log into Google Search Console
- For each site you wish to access data from, choose Manage property -> Add or remove users.
- Click ADD A NEW USER
- Enter the email address from step 6.xv in the User email field.
- Set the Permission dropdown to Full.
- Click the Add button.
- 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.
- 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.