Google Sheets is an online spreadsheet provided by Google. It is considered a part of Google Workspace.
By using Google Sheets, you can create and edit spreadsheets online.
Google Sheets is generally used to collect and manage data, making calculations, creating advanced graphs. etc.
WordPress Quiz Plugin has an Integration with Google Sheets. So, let’s explore how to enable Google Sheets and WordPress Quiz Plugin Integration.
Registering on the Google Cloud Platform #
The first step is to register on the Google Cloud Platform. You can register there by using the following link: https://console.cloud.google.com/. You can skip this step if you have already registered there.
Enabling Google Sheets API #
Please follow these steps to enable the Google Sheets API:
- Head to the Google Sheets API Dashboard.
- Click on the Create Project button.
- Fill in the necessary info and click on the Create button.
- Once you have created a project, click on the Enable APIs and Services button.
- You will be redirected to the Google Sheets API Library. There, search for the Google Sheets API.
- Select the Google Sheets API Extension and enable it.
Once you have enabled the Google Sheets API, please follow these steps to continue the activation process:
- Head to the Credentials page.
- Click on the Create Credentials button and choose the OAuth client ID.
- Be sure to configure the Consent Screen to continue the activation.
- After this step, go back to the Credentials page, click on the Create Credentials button, and choose the OAuth client ID.
- Choose the Application Type as Web Application and add the URL. You can find the Authorized redirect URL you need to paste in the URL part from the Instructions provided on the Google Sheets Integration on the General Settings page of the Quiz Maker plugin.
- Afterward, click on the Create button.
- Copy the Client ID and Client Secret to paste this data into the Quiz Settings later.
Note: You must add a Testing User for the Project and grant the user to see, edit, create, and delete your Google Sheets spreadsheets. Otherwise, you can’t connect the Client ID and Client Secret to the plugin later.
Enabling Google Sheets Integration in the WordPress Quiz Plugin #
Once you have generated the Google Sheets Client ID and Client Secret, it is high time to enable the Integration from the Quiz Settings. To do this, take a look at these steps:
- Head to the Quiz Maker plugin > General Settings page > Integrations Tab.
- Find the Google Sheets Integration and paste the Client ID and Client Secret in the needed inputs.
- Then, click on the Connect button and save the changes.
Once you have inserted the Client ID and Client Secret, follow these steps to finalize the integration:
- Head to the Quizzes page > particular quiz > Integrations Tab.
- Find the Google Sheets Integration and tick the checkbox.
- Save the changes.
Collecting User Data for the Integration #
The final step is to enable the Information Form option for the quiz to collect data and add it to the Google Sheets.
To collect users’ data, please head to the Quizzes page > particular quiz > User Data Tab and tick the Information Form option. Set it either Before or After Quiz.
Then, drag and drop the fields from the Available Fields into the Active Fields.
That’s all. We have successfully connected the Google Sheets to the WordPress Quiz.
For more info about the Quiz User Data Settings, you can check this informative article: https://quiz-plugin.com/docs/quiz-user-data-settings/