Marketing Integrations
Klaviyo for email marketing and Yotpo for product reviews provide marketing automation and social proof.
Overview
HHA Sports uses Klaviyo for sophisticated email marketing with product tracking and Yotpo for collecting and displaying product reviews. Both integrate with BigCommerce product data.
Klaviyo Integration
Primary Integration
Klaviyo Company ID: VNGrUw
Implementation: Child theme inc/class-klaviyo.php
Features
- Onsite Script - Klaviyo tracking loaded on all pages
- Product Page Tracking - Automatic event tracking on product pages
- Add to Cart Tracking - Tracks when users add products to cart
- Product Metadata - Sends complete product info to Klaviyo
Klaviyo Scripts
Onsite Script (loaded in <head>)
URL: https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=VNGrUw
Inline JavaScript object initialization:
!function(){if(!window.klaviyo){window._klOnsite=window._klOnsite||[];
// Klaviyo proxy setup...
Provides klaviyo.push() method for tracking events.
Product Tracking (loaded in footer on product pages)
Tracks three events when user views a product:
1. Viewed Product Event
klaviyo.push(['track', 'Viewed Product', {
Name: "Product Name",
ProductID: "123",
ImageURL: "https://...",
URL: "https://...",
Brand: "Brand Name",
Price: "99.99",
CompareAtPrice: "129.99"
}]);
2. Viewed Item Event (for product recommendations)
klaviyo.push(['trackViewedItem', {
Title: "Product Name",
ItemId: "123",
Categories: [...],
ImageUrl: "https://...",
Url: "https://...",
Metadata: {
Brand: "Brand Name",
Price: "99.99",
CompareAtPrice: "129.99"
}
}]);
3. Added to Cart Event (on button click)
// Listens for clicks on .bc-btn--add_to_cart buttons
klaviyo.push(['track', 'Added to Cart', {
Name: "Product Name",
ProductID: "123",
// ... same product data
}]);
Product Data Sent to Klaviyo
For each product:
- Name - Product title (escaped quotes)
- ProductID - BigCommerce product ID
- ImageURL - Featured image (large size)
- URL - Product permalink
- Brand - Brand name from BigCommerce
- Price - Calculated price (sale price if applicable)
- CompareAtPrice - Regular price (for showing discount)
- Categories - Product categories (if applicable)
Integration with BigCommerce
Code Location: wp-content/themes/suma-elementor-child/inc/class-klaviyo.php
if (function_exists('is_product') && is_product()) :
$product = new \BigCommerce\Post_Types\Product\Product(get_the_ID());
$prices = apply_filters(
'bigcommerce/product/price_range/data',
get_post_meta($product->post_id(), Product::PRICE_RANGE_META_KEY, true),
$product
);
// Extract product data
$name = $product->name;
$id = $product->bc_id();
$image = get_the_post_thumbnail_url($product->post_id(), 'large');
$url = get_permalink($product->post_id());
$brand = $product->brand();
$price = $prices['calculated']['min'];
$compare = $prices['price']['min'];
endif;
Klaviyo Flows & Campaigns
Use these tracked events in Klaviyo for:
Flows:
- Browse Abandonment - Trigger on "Viewed Product" without purchase
- Cart Abandonment - Trigger on "Added to Cart" without checkout
- Product Recommendations - Based on "Viewed Item" history
- Post-Purchase Follow-up - After purchase completion
Segments:
- Users who viewed specific product categories
- Users who viewed high-value products
- Users who added to cart but didn't purchase
- Brand-specific viewers
Back in Stock Notifications (Klaviyo)
Plugin: Back in Stock Notifications for Klaviyo v1.2.4
Location: wp-content/plugins/back-in-stock-notifications-for-klaviyo/
Features
- Product Feed - Custom feed for out-of-stock products
- Sign-up Form - Klaviyo form for stock notifications
- Automatic Integration - Works with BigCommerce inventory
- Custom Templates - Overrideable form templates
Shortcode
[back_in_stock_form]
Display sign-up form on out-of-stock product pages.
Integration
Monitors BigCommerce product inventory and triggers Klaviyo "Back in Stock" flow when products become available.
Gravity Forms Klaviyo Integration
Plugin: Gravity Forms for Klaviyo v1.7.3
Location: wp-content/plugins/gravityforms-klaviyo/
Author: CrossPeak Software
Features
- Feed Add-On - Connects Gravity Forms to Klaviyo API
- Profile Creation - Create/update Klaviyo profiles from form submissions
- List Management - Subscribe users to Klaviyo lists
- Custom Properties - Map form fields to Klaviyo custom properties
- Event Tracking - Track form submissions as Klaviyo events
Setup
- Install and activate plugin
- Navigate to Forms → Settings → Klaviyo
- Enter Klaviyo API Key
- Configure feeds per form:
- Map fields to Klaviyo properties (email, name, etc.)
- Select Klaviyo list to subscribe to
- Set conditional logic if needed
Use Cases
- Newsletter signups
- Contact form submissions
- Product inquiry tracking
- Lead capture with segmentation
- Event registration
Yotpo Integration
Primary Integration
Implementation: Child theme inc/class-yotpo.php
Features
- Product Reviews Widget - Display reviews on product pages
- Star Rating Widget - Show star ratings
- Review Collection - Email flows to request reviews
- Social Integration - Share reviews on social media
Yotpo Widgets
Widget Instance IDs
- Reviews Section:
983978 - Star Rating:
983977
Shortcodes
Reviews Section
[yotpo-reviews-section]
Displays full reviews widget with review list and submission form.
Output:
<div class="yotpo-widget-instance"
data-yotpo-instance-id="983978"
data-yotpo-product-id="123"
data-yotpo-name="Product Name"
data-yotpo-url="https://..."
data-yotpo-image-url="https://..."
data-yotpo-price="99.99"
data-yotpo-currency="USD"
data-yotpo-description="...">
</div>
Star Rating
[yotpo-star-rating]
Displays compact star rating (for product cards, etc.).
Output:
<div class="yotpo-widget-instance"
data-yotpo-instance-id="983977"
data-yotpo-product-id="123">
</div>
Integration with BigCommerce
Code Location: wp-content/themes/suma-elementor-child/inc/class-yotpo.php
$product = new \BigCommerce\Post_Types\Product\Product($product_id);
$product_bc_id = $product->bc_id();
$product_title = $product->get_property('name');
$product_description = $product->get_property('description');
$product_url = get_permalink($product->post_id());
$product_image = get_the_post_thumbnail_url($product->post_id(), 'bc-large');
$product_price = $product->get_property('calculated_price');
Product Data Sent to Yotpo
- Product ID - BigCommerce product ID
- Name - Product title
- URL - Product page URL
- Image URL - Featured image (bc-large size)
- Price - Product price
- Currency - USD (hardcoded)
- Description - Product description
Yotpo Widget Loading
Yotpo Script: Loaded by Yotpo admin or via widget embed code.
Widgets render automatically on page load when Yotpo JavaScript finds matching data-yotpo-instance-id elements.
Display Locations
Typically displayed via shortcodes in:
- Product single page templates (Elementor)
- Custom product sections
- Review tabs/accordions
- Product summary areas
Elementor Widgets
Theme includes custom Elementor widgets for Yotpo:
- yotpo-review-carousel - Scrolling review display
- yotpo-reviews - Static review list
Location: wp-content/themes/suma-elementor/inc/widgets/
Styling
Yotpo widgets use Yotpo's default CSS. Custom styling via:
- Theme CSS overrides
- Yotpo admin customization settings
- Custom CSS targeting
.yotpo-*classes
Review Collection
Yotpo automatically sends review request emails after purchases (configured in Yotpo dashboard):
- Purchase tracked via BigCommerce
- Yotpo triggered after X days
- Customer receives email with review link
- Review submitted through Yotpo
- Review displays on product page
BazaarVoice Integration (Alternative)
Theme includes BazaarVoice widgets (may be for future use or specific products):
Elementor Widgets:
bv-questions-widget- Q&A sectionbv-reviews-widget- Reviews displaybv-star-rating- Star rating
Note: Check if BazaarVoice is actively configured or if Yotpo is the sole review provider.
Email Marketing Strategy
Klaviyo Flow Recommendations
Based on the tracking implementation, recommended Klaviyo flows:
1. Browse Abandonment
- Trigger: Viewed Product, no purchase within 24 hours
- Content: Product reminder, related products, discount offer
- Timing: 2-3 emails over 7 days
2. Cart Abandonment
- Trigger: Added to Cart, no checkout within 2 hours
- Content: Cart reminder, free shipping offer, urgency messaging
- Timing: 1-3 emails over 24-48 hours
3. Post-Purchase
- Trigger: Purchase completion (from BigCommerce)
- Content: Thank you, review request, cross-sell
- Timing: Immediate, 7 days, 30 days
4. Welcome Series
- Trigger: Newsletter signup (Gravity Forms → Klaviyo)
- Content: Brand intro, product highlights, first purchase incentive
- Timing: 3-5 emails over 2 weeks
5. Back in Stock
- Trigger: User signs up for notification
- Content: Product available notification
- Timing: Immediate when inventory restocked
Segmentation Strategies
Create segments based on:
- Viewed Products - Category, brand, price range
- Purchase History - Product type, frequency, recency
- Engagement - Email opens, clicks, site visits
- Geographic - Location-based promotions
- Lifecycle - New, active, lapsed customers
Analytics & Reporting
Klaviyo Reporting
Track performance of:
- Email flows (open rate, click rate, revenue)
- Campaigns (engagement, conversion)
- Product performance (views, adds to cart, purchases)
- Customer lifetime value
Yotpo Reporting
Monitor:
- Review submission rate
- Average star rating
- Review impact on conversion
- Top-reviewed products
Integration with Google Analytics
Suma Analytics plugin (v1.3.5) pushes events to Google Tag Manager dataLayer, which can forward to Google Analytics:
- Product views
- Add to cart
- Purchases
- Custom events
See Custom Plugins - Suma Analytics for details.
Configuration & Setup
Klaviyo Configuration
Theme Configuration:
- Update company ID in
inc/class-klaviyo.phpif different - Current ID:
VNGrUw
Klaviyo Dashboard:
- Verify tracking data flowing
- Create flows and campaigns
- Set up forms and popups
- Configure email templates
Yotpo Configuration
Theme Configuration:
- Update widget instance IDs in
inc/class-yotpo.phpif different - Current IDs: 983978 (reviews), 983977 (star rating)
Yotpo Dashboard:
- Configure review collection emails
- Customize widget appearance
- Set up social sharing
- Enable Q&A if desired
Testing
Klaviyo Testing:
- Visit product page
- Open browser console
- Check for Klaviyo events:
_klOnsitearray - Add to cart and verify event fires
- Check Klaviyo dashboard for recent activity
Yotpo Testing:
- Place shortcode on test page
- Verify widget renders with product data
- Submit test review (may need Yotpo admin approval)
- Check review displays correctly
Troubleshooting
Klaviyo Not Tracking
Issue: Events not appearing in Klaviyo
Solutions:
- Verify company ID is correct
- Check browser console for JavaScript errors
- Ensure klaviyo.js script loaded
- Check product page is BigCommerce product post type
- Verify product has valid data (name, ID, price)
Yotpo Widgets Not Displaying
Issue: Yotpo widgets don't render
Solutions:
- Verify Yotpo script loaded on page
- Check widget instance IDs are correct
- Ensure product ID passed correctly
- Check browser console for errors
- Verify Yotpo account active and configured
Add to Cart Not Tracking
Issue: Klaviyo "Added to Cart" event not firing
Solutions:
- Verify button has class
bc-btn--add_to_cart - Check JavaScript event listener attached
- Ensure product data variables defined
- Test in browser with console logging
- Check for JavaScript conflicts
Related Documentation
- BigCommerce Integration - Product data source
- Custom Plugins - Suma Analytics integration
- Theme System - Where integrations are implemented
- Additional Plugins - Gravity Forms integration