Description
Camco’s Replacement RV Vent Fan Blade has a 6-inch diameter and is for 12 volt-powered RV vents. The fan blade is compatible with a clockwise intake or a counterclockwise exhaust. The fan hole is compatible with .094-inch round bore and .125-inch “D” bore motor shafts. Check blade direction before purchase—rotation direction is determined by looking up at the existing fan blade when the motor for the fan is on. Color: white. Patented.
Extra Information
document.addEventListener('DOMContentLoaded', function() {
// Select the element containing the price
const priceElement = document.querySelector('.price--withoutTax');
// Check if the price element exists and log it for debugging
if (priceElement) {
console.log('Price Element:', priceElement.textContent.trim()); // Log the entire text content of the price element
// Strip the non-numeric characters (e.g., "$", "Your Price: ", etc.)
const priceText = priceElement.textContent.trim().replace(/[^\d.-]/g, '');
const numericPrice = parseFloat(priceText); // Convert the price to a float
console.log('Formatted Numeric Price:', numericPrice); // Log the extracted numeric price
if (numericPrice && !isNaN(numericPrice)) {
console.log('Sending GA4 event with price:', numericPrice); // Log before sending GA4 event
// Proceed with sending the event to GA4 if the price is valid
gtag('event', 'view_item', {
"currency": "USD", // Ensure this is correct for your currency
"value": numericPrice, // Pass the price as a float
"items": [{
"id": "4017", // Use the actual product ID here
"name": "Camco Rhino Ultimate 20' RV Sewer Hose Kit", // Replace with the actual product name
"category": "RVing & Camping, RV Sanitation", // Replace with the actual category
"brand": "Rhino", // Replace with the actual brand
"variant": "single-product-option", // Replace with the actual variant
"price": numericPrice // Include price in the event data
}]
});
} else {
console.error('Invalid price:', numericPrice); // Log if the price is invalid
}
} else {
console.error('Price element not found.'); // Log if the price element is not found
}
});