This project displays customer reviews fetched from a Google Sheets document and displays them on a web page. The reviews are collected via a Google Forms survey and automatically populated into the Google Sheets document.
This project was inspired by Senja.
- Fetches reviews from a Google Sheets document
- Displays reviews with the reviewer's name and date
- Converts dates to a localized format
- PHP (version 7.4 or higher)
- A web server (e.g., Apache, Nginx)
- Google Sheets API key
-
Clone the repository:
git clone https://github.com/valenzine/google-form-reviews.git cd google-form-reviews
-
Configure the application:
- Rename
config.sample.php
toconfig.php
- Fill in the required values in
config.php
:$sheetId = 'your_google_sheet_id'; $sheetName = 'your_sheet_name'; $apiKey = 'your_google_api_key'; $locale = 'your_locale'; // e.g., 'es_ES.UTF-8'
- Rename
-
Start your web server and navigate to the project directory.
-
Create a Google Form:
- Go to Google Forms and create a new form.
- Add fields for the reviewer's name, review text, and date.
-
Link Google Form to Google Sheets:
- After creating the form, click on the "Responses" tab.
- Click on the green Sheets icon to create a new Google Sheets document that will store the responses.
-
Get Google Sheets ID and Sheet Name:
- Open the Google Sheets document created in the previous step.
- The Sheet ID is the long string in the URL between
/d/
and/edit
. - The Sheet Name is the name of the sheet tab at the bottom (usually "Form Responses 1" by default).
-
Enable Google Sheets API:
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Enable the Google Sheets API for your project.
- Create API credentials and get your API key.
- Access the application through your web browser.
- The reviews will be displayed on the main page.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Make your changes
- Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-branch
) - Open a pull request
This project is licensed under the GNU General Public License v3.0.