Concrete CMS Analytics Integrations: Setup Guide | OpsBlu Docs

Concrete CMS Analytics Integrations: Setup Guide

Integrate analytics and marketing tools with Concrete CMS using Header/Footer blocks, page templates, and add-ons.

Concrete CMS (formerly Concrete5) provides multiple methods to integrate analytics platforms, tag managers, and marketing pixels into your website. This section covers the most common integrations and Concrete CMS-specific implementation details.

Available Integrations

Analytics Platforms

Google Analytics 4

  • Header/Footer block implementation
  • Custom block integration
  • Page template implementation
  • GTM implementation (recommended for flexibility)
  • Theme-level integration

Tag Management

Google Tag Manager

  • Header/Footer block installation (simplest)
  • Page template integration
  • Theme customization method
  • Full control across all pages
  • Easier management of multiple tracking pixels

Marketing Pixels

Meta Pixel

Concrete CMS-Specific Integration Considerations

Block-Based Architecture

Concrete CMS uses a block-based editing system:

  • Header/Footer blocks: Simplest method for global scripts
  • Custom blocks: Can include tracking on specific pages
  • Page templates: Theme-level control over tracking
  • Theme customization: Most flexible but requires technical knowledge

Version Differences

Concrete CMS v9+ (Current):

  • Modern PHP 8+ architecture
  • Enhanced block system
  • Better asset management
  • Improved caching system
  • Composer-based dependencies

Concrete5 v8 and Earlier (Legacy):

  • Older PHP architecture
  • Different file structure
  • Legacy block system
  • May require different implementation approach

Page Types and Templates

Concrete CMS organizes content by page types:

  • Each page type can have custom templates
  • Templates can include specific tracking code
  • Single pages vs. page types handled differently
  • Dashboard pages typically excluded from tracking

Caching Considerations

Concrete CMS Caching:

  • Full page caching can affect dynamic scripts
  • Block caching may prevent real-time event tracking
  • Clear cache after implementing tracking code
  • Test with caching enabled and disabled

Cache Settings:

Dashboard → System & Settings → Optimization → Cache & Speed Settings

Performance Impact

Block-Based Tracking:

  • Header/Footer blocks add minimal overhead
  • Custom blocks may impact page load if not optimized
  • Multiple tracking blocks can slow down editor
  • Consider consolidating through GTM

Theme-Based Tracking:

  • Scripts in page templates load on every page
  • Use async/defer attributes when possible
  • Use the Concrete CMS asset system for optimization
  • Monitor Largest Contentful Paint (LCP)

Integration Best Practices

1. Use Header/Footer Block for Global Scripts

The Header/Footer block is the simplest way to add tracking:

Dashboard → System & Settings → SEO & Statistics → Tracking Codes

Or install via marketplace:

  • Search for "Header Extra HTML"
  • Install block
  • Add to site-wide header/footer

Advantages:

  • No code editing required
  • Easy to update through dashboard
  • Version control through Concrete CMS
  • Non-technical users can manage

2. Consolidate Through GTM

Instead of adding multiple pixels directly:

  • Install GTM once via Header/Footer block
  • Add all tracking pixels through GTM
  • Easier to manage and update
  • Better performance (single container load)
  • Marketers can update without developer help

3. Test Across Page Types

Always test integrations across different page types:

  • Homepage - Landing page tracking
  • Blog posts - Content engagement
  • Forms - Lead capture tracking
  • Landing pages - Campaign tracking
  • E-commerce pages - Product/cart tracking (if using add-ons)

4. Handle User Privacy

GDPR/CCPA Compliance:

// Example: Check for user consent before loading tracking
<?php
if (isset($_COOKIE['tracking_consent']) && $_COOKIE['tracking_consent'] === 'true') {
    // Load tracking scripts
    ?>
    <script>
        // GA4, Meta Pixel, etc.
    </script>
    <?php
}
?>

Concrete CMS Cookie Consent Add-ons:

  • Search marketplace for cookie consent solutions
  • Integrate with tracking code
  • Delay script loading until consent

5. Monitor Data Quality

See Events Not Firing for debugging steps.

Common data quality issues:

  • Tracking code in editor mode vs. view mode
  • Cache preventing scripts from updating
  • JavaScript conflicts with other blocks
  • Missing scripts on specific page templates

Common Integration Methods

Setup:

  1. Install tracking code block from marketplace
  2. Add code via Dashboard
  3. Applies site-wide automatically

Limitations:

  • Less control over specific pages
  • May load on admin pages if not configured properly
  • Harder to implement complex logic

Method 2: Page Template Integration

Setup:

  1. Edit page template files in /application/themes/[your-theme]/
  2. Add tracking code to relevant templates
  3. Clear cache and test

Advantages:

  • Full control over implementation
  • Can customize per page type
  • Can add conditional logic
  • Better integration with theme

Method 3: Theme Customization

Setup:

  1. Edit theme files (page_theme.php, view.php, etc.)
  2. Use Concrete CMS asset system
  3. Implement custom tracking logic
  4. Version control through Git

Advantages:

  • Most flexible approach
  • Best performance optimization
  • Complete control
  • Professional implementation

Method 4: Custom Block Development

Setup:

  1. Create custom block package
  2. Include tracking functionality
  3. Install via Package Manager
  4. Add to pages as needed

E-Commerce Tracking Considerations

If using Concrete CMS for e-commerce:

Community Store Add-on

Popular free e-commerce add-on for Concrete CMS:

  • Product pages
  • Shopping cart
  • Checkout process
  • Order confirmation

Integration points:

  • View product events
  • Add to cart tracking
  • Purchase tracking
  • Revenue reporting

Custom E-Commerce Solutions

For custom implementations:

  • Track form submissions
  • Ajax cart updates
  • Payment gateway integrations
  • Custom event tracking

Next Steps

Choose your integration to get started:

For general integration concepts, see the global integrations hub.