HubSpot Troubleshooting Overview | Blue Frog Docs

HubSpot Troubleshooting Overview

Common issues and solutions for HubSpot CMS, including performance problems and tracking issues.

HubSpot Troubleshooting Overview

This section covers common issues you might encounter with HubSpot CMS Hub, including performance problems, tracking issues, and platform-specific challenges.

Common Issue Categories

Performance Issues

HubSpot sites can experience performance problems affecting Core Web Vitals and user experience.

Largest Contentful Paint (LCP)

  • Slow loading times
  • Large images blocking render
  • HubSpot modules loading slowly
  • External scripts delaying content
  • CDN not optimized

Cumulative Layout Shift (CLS)

  • Content jumping during page load
  • HubSpot forms shifting layout
  • Dynamic Smart Content causing shifts
  • Images without dimensions
  • Custom modules with unstable layouts

Tracking & Analytics Issues

Problems with GA4, GTM, Meta Pixel, or HubSpot's native analytics.

Events Not Firing

  • GA4 or Meta Pixel events not tracking
  • Form submissions not captured
  • GTM tags not firing
  • Duplicate events
  • HubSpot analytics conflicts

Quick Diagnostic Steps

Performance Issues

  1. Test with PageSpeed Insights

  2. Check HubSpot Page Performance

    • Go to WebsitePages
    • Select page
    • Click ActionsView page analytics
    • Review load times
  3. Inspect Browser DevTools

    • Open DevTools (F12)
    • Go to Network tab
    • Reload page
    • Identify slow resources

Tracking Issues

  1. Verify Base Installation

    • Check Site Header HTML contains tracking code
    • Verify no JavaScript errors in console
    • Confirm tracking IDs are correct
  2. Use Browser Extensions

    • Google Tag Assistant - For GTM debugging
    • Meta Pixel Helper - For Meta Pixel verification
    • GA Debugger - For Google Analytics
  3. Check HubSpot Analytics

    • Go to ReportsAnalytics Tools
    • Verify HubSpot tracking is working
    • Compare with external analytics

HubSpot-Specific Challenges

Native Analytics Conflicts

Issue: HubSpot's built-in analytics may conflict with external tools (GA4, etc.)

Symptoms:

  • Duplicate event tracking
  • Discrepancies in numbers between platforms
  • Form submissions counted multiple times

Solution:

  • Accept both systems track events (they serve different purposes)
  • Use HubSpot for CRM and contact attribution
  • Use GA4 for website behavior and user flow
  • Document which system is source of truth for each metric

See Analytics Conflicts for details.

HubL Variable Issues

Issue: HubL variables returning empty or incorrect values

Symptoms:

  • \{\{ contact.email \}\} returns empty string
  • Template variables undefined
  • Conditional logic not working

Solutions:

  1. Check variable scope - Contact variables only work for identified visitors
  2. Verify syntax - HubL is case-sensitive
  3. Test with static content first
  4. Check required modules - Some features require specific HubSpot subscriptions

Debug:

{# Test variable output #}
Contact Email: {{ contact.email }}
Contact ID: {{ contact.vid }}
Lifecycle: {{ contact.lifecycle_stage }}

Template and Module Issues

Issue: Custom modules or templates not working as expected

Common problems:

  • Module not appearing on page
  • HubL syntax errors
  • Module fields not populating
  • Template inheritance issues

Solutions:

  1. Check module fields - Verify field IDs match template references
  2. Review template structure - Ensure proper HubL syntax
  3. Clear cache - HubSpot caches templates and modules
  4. Check console - JavaScript errors may prevent module loading

Form Tracking Issues

Issue: HubSpot forms not triggering external analytics events

Causes:

  • Event listener added after form loads
  • Incorrect form callback syntax
  • Multiple form implementations conflicting

Solution:

// Proper form event listener
window.addEventListener('message', function(event) {
  if (event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmitted') {
    // Your tracking code here
    console.log('Form submitted:', event.data.id);
  }
});

See Form Tracking.

Debugging Tools

Browser Developer Tools

Console:

  • View JavaScript errors
  • Test HubL variable output
  • Debug event firing

Network Tab:

  • Monitor resource loading
  • Check tracking pixel requests
  • Identify slow scripts

Performance Tab:

HubSpot Developer Tools

Template Inspector:

  • In HubSpot, add ?hs_preview=true to URL
  • View template structure
  • See module rendering

HubL Playground:

  • Test HubL syntax
  • Debug variables
  • Experiment with logic

External Tools

PageSpeed Insights:

GTM Preview Mode:

  • Debug tag firing
  • Inspect data layer
  • Test triggers

GA4 DebugView:

  • Real-time event inspection
  • Parameter verification
  • Event debugging

Getting Help

HubSpot Support

  • HubSpot Academy - Free training and certification
  • HubSpot Community - Forum for peer support
  • HubSpot Support - Technical support (varies by subscription)
  • HubSpot Documentation - Official guides

External Resources

  • Stack Overflow - hubspot tag for technical questions
  • HubSpot Developer Slack - Community for developers
  • This Documentation - Platform-specific guides

Prevention Best Practices

Performance

  1. Optimize images before uploading to HubSpot
  2. Use HubSpot's CDN for asset delivery
  3. Minimize custom code in modules
  4. Async load scripts when possible
  5. Test on staging before production changes

Tracking

  1. Use GTM for centralized tag management
  2. Document all tracking implementations
  3. Test in preview mode before publishing
  4. Use descriptive names for tags and triggers
  5. Version control GTM containers

Development

  1. Use Design Tools for local development
  2. Follow HubL best practices from HubSpot docs
  3. Test across browsers and devices
  4. Implement error handling in custom code
  5. Keep modules simple and focused

Next Steps

Choose your issue category:

For integration-specific issues, see the Integrations section.

// SYS.FOOTER