This article discusses how to validate Category Snippets. To learn more about implementing Category Snippets, click here.
Once Category Snippets have been implemented, there are steps you can take to verify that they are implemented correctly.
This article contains the following sections:
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 PLP 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 Display 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 PLP 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 display.powerreviews.com
5. Look for calls containing the word snippet
Note: You may see multiple results. This is because the PowerReviews Javascript batches the Category Snippet calls in batches of 10 at a time.
6. Choose one of these results and click Headers
7. This API call is structured in the following manner:
https://display.powerreviews.com/m/[merchant_id/l/[locale]/product/[page_id_1]%2C[page_id_2]%2C[page_id_3]%2C[page_id_4]%2C[page_id_5]%2C[page_id_6]%2C[page_id_7]%2C[page_id_8]%2C[page_id_9]%2C[page_id_10]/snippet?apikey=[api_key]&_noconfig=true
You may also see it like this if you are using the PowerReviews Review Translation feature:
https://display.powerreviews.com/m/[merchant_id]/l/all/product/[page_id_1]%2C[page_id_2]%2C[page_id_3]%2C[page_id_4]%2C[page_id_5]%2C[page_id_6]%2C[page_id_7]%2C[page_id_8]%2C[page_id_9]%2C[page_id_10]/snippet?apikey=[api_key]&_noconfig=true&page_locale=[locale]