Review Element Types:
https://docs.bazaarvoice.com/articles/#!ratings-reviews/integrate-bazaarvoice-ugc-into-your-pdp/a/add-code-to-product-display-pagesNote the BV Loader is on ALL pages on the HEADER via Squarespace Code Injection, so no need to include on any of the product pages or warranty.
1. Rating Summary (Top of Product Page)
Position is correct but currently it’s a Category Page Inline rating is used (Not clickable), Not Rating Summary
https://docs.bazaarvoice.com/articles/#!ratings-reviews/integrate-bazaarvoice-ugc-into-your-pdp/a/add-code-to-product-display-pages
2. Rating display
(Pin to bottom of Product Page. After ProductItem-additional but before the footer.
Note, it is possible for some pages not to have a “Additional info” on some pages so code will need to take this into account and locate it between the main container and the footer.
Currently broken and is beside the Additional Info section. Guide also found https://docs.bazaarvoice.com/articles/#!ratings-reviews/integrate-bazaarvoice-ugc-into-your-pdp
3. Category Page Inline ratings.
Different to Ratings Summary
(these should only be on the Category page (eg Ovens https://omegaappliances.com.au/ovens)
Appears to be correct but double check that this code is used
4 Transaction Event
– Upon Warranty Registration
This needs to happen on the submit button at https://omegaappliances.com.au/warranty
Here is the guide:
https://docs.bazaarvoice.com/articles/#!ratings-reviews/bv-pixel
Below is the old code (not working), we need to submit the Model Code, Name and Email from the form.
<script>
document.addEventListener('DOMContentLoaded', function (event) {
window.bvCallback = function (BV) {
try {
// Identify the form with a specific redirect attribute
const form = document.querySelector("form[data-success-redirect='/thank-you']");
if (!form) {
console.error('Form not found.');
return;
}
const submitButton = form.querySelector("input[type='submit']");
const inputs = form.querySelectorAll("input");
const selects = form.querySelectorAll("select");
// Ensure submit button and required fields exist
if (!submitButton || inputs.length < 9 || selects.length < 2) {
console.error('Form structure is incomplete.');
return;
}
submitButton.addEventListener('click', function (event) {
event.preventDefault(); // Prevent default submission
// Validate date fields
if (!inputs[1].value || !inputs[2].value || !inputs[3].value) {
console.error('Date fields are incomplete.');
return;
}
// Prepare form data
let formData = {
applianceType: selects[0].value,
modelNumber: selects[1].value,
serialNumber: inputs[0].value,
dateOfPurchase: [inputs[1].value, inputs[2].value, inputs[3].value].join('/'),
placeOfPurchase: inputs[4].value,
first: inputs[5].value,
last: inputs[6].value,
email: inputs[7].value,
telephoneNumber: inputs[8].value,
};
// Send transaction data to Bazaarvoice
BV.pixel.trackTransaction({
currency: "AUD",
orderId: formData.serialNumber, // Serial Number
total: "0",
items: [
{
price: "0",
quantity: "1",
productId: formData.modelNumber // Model Number
}
],
email: formData.email, // Email
locale: "en_AU",
nickname: formData.first // First Name
});
// Submit the form after tracking
form.submit();
});
} catch (error) {
console.error("Failed to send transaction to BV:", error);
}
};
});
</script>