Ucraft Troubleshooting: Common Issues and Fixes | OpsBlu Docs

Ucraft Troubleshooting: Common Issues and Fixes

Debug analytics issues on Ucraft — custom code injection, built-in integrations panel, ecommerce tracking, and designer mode conflicts.

Ucraft is a managed website builder with ecommerce capabilities and a drag-and-drop editor. Analytics troubleshooting on Ucraft is limited by the platform's managed nature: you have designated code injection points but no server access, and the platform's built-in integrations can overlap with manual tracking code.

Ucraft-Specific Debugging Approach

Ucraft provides analytics integration through two paths: the built-in Integrations panel and custom code injection. Check both to avoid duplicates.

Check Built-in Integrations

  1. Ucraft Dashboard > Settings > Integrations > Google Analytics: Built-in GA integration that auto-injects tracking
  2. Ucraft Dashboard > Settings > Integrations > Google Tag Manager: Built-in GTM integration
  3. Ucraft Dashboard > Settings > Integrations > Facebook Pixel: Built-in Meta Pixel integration
// In browser console, verify what loaded
console.log('GA loaded:', typeof gtag === 'function');
console.log('GTM loaded:', typeof google_tag_manager !== 'undefined');

// Count analytics script instances (check for duplicates)
var gaCount = document.querySelectorAll('script[src*="gtag"], script[src*="google-analytics"]').length;
var gtmCount = document.querySelectorAll('script[src*="gtm.js"]').length;
console.log('GA scripts:', gaCount, '| GTM scripts:', gtmCount);
if (gaCount > 1 || gtmCount > 1) console.log('WARNING: Duplicate analytics detected');

Check Custom Code Injection

  1. Dashboard > Settings > Custom Code > Header: Scripts added to <head>
  2. Dashboard > Settings > Custom Code > Body (start): Scripts after <body> opening
  3. Dashboard > Settings > Custom Code > Body (end): Scripts before </body>

Most Common Ucraft Analytics Issues

1. Built-in Integration AND Manual Code Running Together

Symptoms: Double pageview counts. Two instances of GA or GTM loading simultaneously.

Root cause: The built-in Google Analytics integration is enabled in Settings > Integrations, AND you also pasted GA/GTM code in Settings > Custom Code.

Fix: Use one method only:

# Option A: Use built-in integration (simpler)
# Settings > Integrations > Google Analytics > enter Measurement ID
# Remove any analytics code from Settings > Custom Code

# Option B: Use custom code (more control)
# Settings > Integrations > Google Analytics > remove/disable
# Add your code in Settings > Custom Code > Header

2. Ecommerce Events Not Tracking

Symptoms: Pageviews work but add-to-cart, checkout, and purchase events are missing.

Root cause: Ucraft's built-in GA integration tracks basic pageviews but does not automatically push enhanced ecommerce events. Product interactions use AJAX and do not trigger standard page loads.

Fix: Add custom event tracking via the Custom Code section:

// In Settings > Custom Code > Body (end)
// Listen for Ucraft ecommerce interactions
document.addEventListener('click', function(e) {
  // Add to cart button detection
  var addToCartBtn = e.target.closest('[data-action="add-to-cart"], .add-to-cart-btn');
  if (addToCartBtn) {
    var productCard = addToCartBtn.closest('[data-product-id]');
    gtag('event', 'add_to_cart', {
      items: [{
        item_id: productCard?.dataset.productId || '',
        item_name: productCard?.querySelector('.product-title')?.textContent || ''
      }]
    });
  }
});

Symptoms: Sessions break when navigating between the Ucraft subdomain and custom domain. Analytics shows high bounce rates.

Root cause: During custom domain setup or DNS propagation, visitors may be redirected between yoursite.ucraft.site and yourdomain.com. Cookies set for one domain are not shared with the other.

Fix: Configure cross-domain tracking:

gtag('config', 'G-XXXXXXX', {
  cookie_domain: 'auto',
  linker: {
    domains: ['yoursite.ucraft.site', 'yourdomain.com']
  }
});

4. Designer/Preview Mode Generating False Traffic

Symptoms: Pageview counts spike when designers or content editors work in the Ucraft editor.

Root cause: Ucraft's designer mode renders the live page in a preview frame. If analytics code executes in the preview, editing sessions generate tracking data.

Fix:

// Detect Ucraft designer/preview mode
var isUcraftEditor = window.parent !== window ||
  window.location.search.includes('ucraftPreview') ||
  document.referrer.includes('ucraft.com/dashboard');

if (isUcraftEditor) {
  window['ga-disable-G-XXXXXXX'] = true;
}

5. Multi-Language Site Fragmenting Data

Symptoms: Analytics shows separate page entries for each language version. Traffic is split across /en/, /es/, /de/ paths.

Root cause: Ucraft's multi-language feature creates separate URL paths per language.

Fix: Normalize language prefixes and track language as a dimension:

var path = window.location.pathname.replace(/^\/(en|es|de|fr|ru)\//, '/');
gtag('config', 'G-XXXXXXX', {
  page_path: path,
  custom_map: { dimension1: 'content_language' }
});
gtag('event', 'page_view', {
  content_language: document.documentElement.lang || 'en'
});

Environment Considerations

  • Managed platform: No FTP, SSH, or server access. All changes through the Ucraft dashboard
  • CDN-served: Ucraft uses a CDN. Custom code changes may take a few minutes to propagate after publishing
  • Plan restrictions: Some plans may restrict custom code injection capabilities. Verify your plan's feature set
  • SSL included: All Ucraft sites include SSL. No mixed-content issues expected
  • Mobile builder: Ucraft has a separate mobile editor. Verify analytics appears on both desktop and mobile views

Performance Issues

  • LCP Issues - Builder-generated layout rendering and CDN delivery timing
  • CLS Issues - Layout shifts from dynamic content loading and ecommerce widget rendering

Tracking Issues

  • Events Not Firing - Debug integration duplicates, ecommerce AJAX events, and preview mode leakage