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
- 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.
- 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
Test with PageSpeed Insights
- Visit PageSpeed Insights
- Enter your HubSpot URL
- Review Core Web Vitals scores
- Identify specific issues
Check HubSpot Page Performance
Inspect Browser DevTools
- Open DevTools (F12)
- Go to Network tab
- Reload page
- Identify slow resources
Tracking Issues
Verify Base Installation
- Check Site Header HTML contains tracking code
- Verify no JavaScript errors in console
- Confirm tracking IDs are correct
Use Browser Extensions
- Google Tag Assistant - For GTM debugging
- Meta Pixel Helper - For Meta Pixel verification
- GA Debugger - For Google Analytics
Check HubSpot Analytics
- Go to Reports → Analytics 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:
- Check variable scope - Contact variables only work for identified visitors
- Verify syntax - HubL is case-sensitive
- Test with static content first
- 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:
- Check module fields - Verify field IDs match template references
- Review template structure - Ensure proper HubL syntax
- Clear cache - HubSpot caches templates and modules
- 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:
- Record page load
- Identify render-blocking resources
- Measure Core Web Vitals
HubSpot Developer Tools
Template Inspector:
- In HubSpot, add
?hs_preview=trueto URL - View template structure
- See module rendering
HubL Playground:
- Test HubL syntax
- Debug variables
- Experiment with logic
External Tools
PageSpeed Insights:
- https://pagespeed.web.dev/
- Core Web Vitals analysis
- Performance recommendations
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 -
hubspottag for technical questions - HubSpot Developer Slack - Community for developers
- This Documentation - Platform-specific guides
Prevention Best Practices
Performance
- Optimize images before uploading to HubSpot
- Use HubSpot's CDN for asset delivery
- Minimize custom code in modules
- Async load scripts when possible
- Test on staging before production changes
Tracking
- Use GTM for centralized tag management
- Document all tracking implementations
- Test in preview mode before publishing
- Use descriptive names for tags and triggers
- Version control GTM containers
Development
- Use Design Tools for local development
- Follow HubL best practices from HubSpot docs
- Test across browsers and devices
- Implement error handling in custom code
- Keep modules simple and focused
Next Steps
Choose your issue category:
- Fix LCP Issues - Improve page load speed
- Fix CLS Issues - Reduce layout shifts
- Fix Events Not Firing - Debug tracking problems
For integration-specific issues, see the Integrations section.