This article discusses how to validate the Write-a-Review (WAR) form. To learn more about implementing the WAR form, click here.
Once the WAR form has been implemented, there are steps you can take to verify it is implemented correctly.
This article contains the following sections:
- Verifying Placement of the Unified JavaScript File
- Validating via the API Call
-
Validating via Review Submission
Verifying Placement of the Unified Javascript File
The location of the unified JavaScript file on the page is important. PowerReviews' best practice is to place this call within the body of the page, not the head. To verify the location of this file, follow these steps:
1. Open up Developer Tools in your web browser (in Google Chrome, you can use the shortcut Cmd+Option+I to open on Mac, or Ctrl+Shift+I to open on Windows)
2. Either load the WAR page for the first time, or reload if you were already on this page
3. Select the Elements tab within the Developer Tools window
4. Use Ctrl+F to open the find dialogue and search for ui.js
5. Ensure this is located within the <body> tags on the page. Placing the ui.js within the head of the page can lead to unexpected issues.
Validating via the API Call
If the PowerReviews code has been added properly and is functional, you should be able to see the call made to the PowerReviews writeservices API. To validate this call, follow these steps:
1. Open up Developer Tools in your web browser (in Google Chrome, you can use the shortcut Cmd+Option+I to open on Mac, or Ctrl+Shift+I to open on Windows)
2. Either load the WAR page for the first time, or reload if you were already on this page
3. Select the Network tab within the Developer Tools window
4. In the Filter field, enter writeservices.powerreviews.com
5. Select the results and click on Payload
6. Confirm that the merchant_id and locale values match the ones provided by PowerReviews. Also ensure that the page_id is the correct value for the product being reviewed.
Validating Via Review Submission
You can also verify that the WAR form is properly implemented by submitting a test review and confirming that the review shows up in Moderation in the PowerReviews Portal. (This method of testing will require that you have a valid login to the PowerReviews Portal.)
1. Load your WAR page
2. Fill out your WAR form completely and click Submit
3. Log into the PowerReviews Portal
4. Click Reviews in the lefthand menu
5. Click Native Reviews
6. Enter the Page ID of the product on which you just wrote the test review
7. Scroll down and click Search at the bottom of the page
8. Find the review you wrote on the resulting Moderation page
If your test review is present in Moderation as expected, this is an indication that the WAR form is implemented properly.