Getsimplecms Analytics Integrations: Setup Guide | OpsBlu Docs

Getsimplecms Analytics Integrations: Setup Guide

Integrate GA4, GTM, and Meta Pixel with GetSimple CMS using theme templates, plugins, and the Components feature.

GetSimple CMS is an ultra-lightweight flat-file CMS that stores content in XML files. It requires only PHP (no database) and is designed for small sites with under 50 pages. Analytics integration uses GetSimple's theme template system or its plugin architecture.

Integration Architecture

GetSimple provides three integration paths:

  1. Theme Templates -- Edit your theme's template.php in /theme/yourtheme/. GetSimple uses plain PHP templates with helper functions like get_page_title() and get_site_name().
  2. Components -- GetSimple's "Components" feature (accessible at Components in the admin sidebar) provides reusable content blocks that can include HTML/JavaScript. Insert them in templates with <?php get_component('tracking'); ?>.
  3. Plugins -- PHP plugins in /plugins/. GetSimple has a small plugin repository at get-simple.info/extend/. Some analytics plugins exist but many target outdated Google Analytics versions.

Available Integrations

Analytics Platforms

Google Analytics 4

  • Theme template injection
  • Component with gtag.js snippet
  • GTM-based GA4 (recommended)

Tag Management

Google Tag Manager

  • Theme template head/body injection
  • Component-based GTM snippet

Marketing Pixels

Meta Pixel

  • Via GTM container (recommended)
  • Theme template head injection

Theme Template Integration

Edit your theme's main template file to add GTM and a data layer:

<?php // theme/yourtheme/template.php ?>
<!DOCTYPE html>
<html lang="<?php get_site_lang(); ?>">
<head>
  <!-- Google Tag Manager -->
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;
  j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;
  f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-XXXX');</script>

  <script>
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    'pageTitle': '<?php get_page_title(); ?>',
    'pageSlug': '<?php get_page_slug(); ?>',
    'siteName': '<?php get_site_name(); ?>',
    'pageDate': '<?php get_page_date("Y-m-d"); ?>',
    'metaDescription': '<?php get_page_meta_desc(); ?>'
  });
  </script>

  <?php get_header(); ?>
</head>
<body>
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX"
  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

  <?php get_page_content(); ?>
  <?php get_footer(); ?>
</body>
</html>

Component-Based Approach

Create a Component at Components > Create New called tracking_code:

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;
j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;
f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-XXXX');</script>

Then call it in your template: <?php get_component('tracking_code'); ?>

This lets admin users modify the GTM container ID without editing template files.

Platform Limitations

Extremely limited page data. GetSimple does not have categories, tags, content types, or taxonomy. The data layer is limited to page title, slug, date, and meta description. There are no structured content fields to enrich analytics dimensions.

No ecommerce. GetSimple has no cart, checkout, or product functionality. Ecommerce tracking is not applicable.

Plugin ecosystem is dormant. The GetSimple plugin repository has minimal activity. Most plugins target Google Analytics Universal (deprecated). Manual template integration is the standard approach for GA4 and GTM.

No server-side tracking. GetSimple is a flat-file CMS with no backend API, no webhooks, and no event system for server-side analytics.

XML storage performance. GetSimple reads XML files from disk on each page request. On shared hosting with slow disk I/O, adding tracking scripts to an already-slow render pipeline compounds page load times.

No staging or preview. Changes to templates go live immediately. There is no draft preview URL or staging environment for testing tracking changes.

Performance Considerations

  • Ultra-lightweight baseline. GetSimple pages are typically 20-50KB of HTML. A single GTM container can represent 50-100% of the total page weight. Every additional tracking script has outsized impact.
  • No build step. There is no CSS/JS bundling, minification, or asset pipeline. Scripts load as individual files.
  • Shared hosting reality. GetSimple is typically deployed on budget shared hosting. Third-party script DNS lookups and downloads can add 1-3 seconds to page load on slow hosts.
  1. Add GTM to theme template -- Single container, minimal overhead
  2. Create Component for GTM snippet -- Admin-editable without template access
  3. Configure GA4 in GTM -- Basic pageview tracking with available page metadata
  4. Add Meta Pixel via GTM -- Standard pageview tracking

Next Steps

For general integration concepts, see the integrations overview.