Shahi LegalFlowSuite

Integration Problems

Fix Issues with Third-Party Services and Plugins

Google Analytics Integration Issues

Step 1: Verify GA4 Setup

`
SLOS → Integrations → Google Analytics → Status Check
`

GA4 Configuration Check:
`json
{
“measurement_id”: “G-XXXXXXXXXX”,
“status”: “connected”,
“last_sync”: “2025-12-31T10:30:00Z”,
“consenteventstracked”: 1250,
“issues_detected”: [
{
“type”: “consent_mapping”,
“severity”: “warning”,
“message”: “Analytics consent not properly mapped to GA consent settings”
}
]
}
`

Step 2: Fix Consent Mapping

`
SLOS → Integrations → Google Analytics → Consent Settings
`

GA Consent Configuration:
`javascript
// Correct GA consent mapping
gtag(‘consent’, ‘default’, {
‘analytics_storage’: ‘{{SLOS Analytics Consent}}’ === ‘true’ ? ‘granted’ : ‘denied’,
‘ad_storage’: ‘{{SLOS Marketing Consent}}’ === ‘true’ ? ‘granted’ : ‘denied’,
‘functionality_storage’: ‘{{SLOS Preferences Consent}}’ === ‘true’ ? ‘granted’ : ‘denied’,
‘personalization_storage’: ‘{{SLOS Marketing Consent}}’ === ‘true’ ? ‘granted’ : ‘denied’,
‘security_storage’: ‘granted’
});
`

Step 3: Test GA Events

`
SLOS → Integrations → Google Analytics → Test Events
`

Event Testing:

    1. [x] Page views tracking
    2. [x] Consent events firing
    3. [x] Custom events working
    4. [x] E-commerce tracking (if enabled)
    5. Facebook Pixel Integration Issues

      Step 1: Check Pixel Configuration

      `
      SLOS → Integrations → Facebook Pixel → Status Check
      `

      Pixel Status:
      `json
      {
      “pixel_id”: “XXXXXXXXXXXXXXXXX”,
      “status”: “connected”,
      “last_event”: “2025-12-31T10:25:00Z”,
      “eventssenttoday”: 89,
      “consent_issues”: [
      {
      “type”: “pixel_loading”,
      “severity”: “error”,
      “message”: “Facebook pixel loading without marketing consent”
      }
      ]
      }
      `

      Step 2: Fix Consent-Gated Loading

      `javascript
      // Correct Facebook pixel loading
      function loadFacebookPixel() {
      if (window.SLOS && window.SLOS.hasConsent(‘marketing’)) {
      !function(f,b,e,v,n,t,s)
      {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
      n.callMethod.apply(n,arguments):n.queue.push(arguments)};
      if(!f.fbq)f.fbq=n;n.push=n;n.loaded=!0;n.version=’2.0′;
      n.queue=[];t=b.createElement(e);t.async=!0;
      t.src=v;s=b.getElementsByTagName(e)[0];
      s.parentNode.insertBefore(t,s)}(window, document,’script’,
      ‘https://connect.facebook.net/en_US/fbevents.js’);
      fbq(‘init’, ‘{{FACEBOOKPIXELID}}’);
      fbq(‘track’, ‘PageView’);
      }
      }

      // Load pixel after consent
      document.addEventListener(‘slosconsentupdated’, function(event) {
      if (event.detail.categories.includes(‘marketing’)) {
      loadFacebookPixel();
      }
      });
      `

      Step 3: Test Pixel Events

      `
      SLOS → Integrations → Facebook Pixel → Test Events
      `

      Pixel Testing Checklist:

    6. [x] Pixel fires only with consent
    7. [x] Standard events tracked
    8. [x] Custom events working
    9. [x] Conversion tracking active
    10. WordPress Plugin Conflicts

      Step 1: Detect Plugin Conflicts

      `
      SLOS → Troubleshooting → Plugin Conflicts → Scan
      `

      Conflict Detection Results:
      `json
      {
      “conflicting_plugins”: [
      {
      “plugin”: “wp-rocket/wp-rocket.php”,
      “conflicttype”: “javascriptloading”,
      “severity”: “high”,
      “description”: “Caching plugin interfering with consent banner loading”
      },
      {
      “plugin”: “wordpress-seo/wp-seo.php”,
      “conflicttype”: “cookiesetting”,
      “severity”: “medium”,
      “description”: “SEO plugin setting cookies before consent”
      }
      ],
      “recommended_actions”: [
      “Configure caching plugin to exclude SLOS scripts”,
      “Disable SEO plugin cookie setting until consent given”
      ]
      }
      `

      Step 2: Resolve JavaScript Conflicts

      `
      SLOS → Troubleshooting → Plugin Conflicts → JavaScript Fixes
      `

      Common Fixes:
      `javascript
      // Fix jQuery conflicts
      jQuery.noConflict();
      (function($) {
      // SLOS jQuery code here
      })(jQuery);

      // Fix script loading order
      wpenqueuescript(‘slos-consent’, plugindirurl(FILE) . ‘js/consent.js’, array(‘jquery’), ‘1.0’, true);

      // Exclude from caching
      // Add to WP Rocket exclude list:
      // /wp-content/plugins/shahi-legalflowsuite/.*\.js
      // /wp-content/plugins/shahi-legalflowsuite/.*\.css
      `

      Step 3: Test Plugin Compatibility

      `
      SLOS → Troubleshooting → Plugin Conflicts → Compatibility Test
      `

      Compatibility Testing:

    11. Banner displays correctly
    12. Consent saves properly
    13. No JavaScript errors
    14. Performance not degraded
    15. Other plugins still functional
    16. API Integration Issues

      Step 1: Check API Connectivity

      `
      SLOS → Integrations → API → Connection Test
      `

      API Status Check:
      `json
      {
      “endpoints_tested”: [
      {
      “endpoint”: “/wp-json/slos/v1/consent”,
      “status”: “success”,
      “responsetimems”: 45
      },
      {
      “endpoint”: “/wp-json/slos/v1/dsr”,
      “status”: “error”,
      “error”: “401 Unauthorized”,
      “solution”: “Check API authentication”
      }
      ],
      “overallstatus”: “partialfailure”,
      “recommendations”: [
      “Verify API keys”,
      “Check endpoint permissions”,
      “Review authentication settings”
      ]
      }
      `

      Step 2: Fix API Authentication

      `
      SLOS → Integrations → API → Authentication Settings
      `

      API Authentication:
      `json
      {
      “authmethod”: “bearertoken”,
      “token_endpoint”: “/wp-json/jwt-auth/v1/token”,
      “validate_token”: true,
      “token_expiry”: 3600,
      “rate_limiting”: {
      “requestsperminute”: 60,
      “burst_limit”: 10
      }
      }
      `

      Step 3: Test API Endpoints

      `bash

      Test API endpoints

      curl -X GET “https://yourwebsite.com/wp-json/slos/v1/consent/status” \
      -H “Authorization: Bearer YOURAPITOKEN” \
      -H “Content-Type: application/json”

      curl -X POST “https://yourwebsite.com/wp-json/slos/v1/dsr/request” \
      -H “Authorization: Bearer YOURAPITOKEN” \
      -H “Content-Type: application/json” \
      -d ‘{“type”:”access”,”user_email”:”test@example.com”}’
      `

      Webhook Integration Problems

      Step 1: Check Webhook Configuration

      `
      SLOS → Integrations → Webhooks → Status Check
      `

      Webhook Status:
      `json
      {
      “webhooks_configured”: [
      {
      “name”: “consent_events”,
      “url”: “https://api.yourcompany.com/webhooks/consent”,
      “status”: “failing”,
      “last_error”: “Connection timeout”,
      “retry_count”: 3
      },
      {
      “name”: “dsr_events”,
      “url”: “https://api.yourcompany.com/webhooks/dsr”,
      “status”: “success”,
      “last_success”: “2025-12-31T10:20:00Z”
      }
      ],
      “delivery_rate”: “75%”,
      “averageresponsetime”: “850ms”
      }
      `

      Step 2: Fix Webhook Delivery

      `
      SLOS → Integrations → Webhooks → Retry Failed Deliveries
      `

      Webhook Retry Configuration:
      `json
      {
      “retry_attempts”: 5,
      “retrydelayseconds”: 60,
      “exponential_backoff”: true,
      “maxretrydelay”: 3600,
      “failure_notification”: {
      “enabled”: true,
      “email”: “webmaster@yourcompany.com”,
      “threshold”: 10
      }
      }
      `

      Step 3: Test Webhook Payloads

      `javascript
      // Test webhook payload
      const testPayload = {
      event: ‘consent_granted’,
      timestamp: new Date().toISOString(),
      userid: ‘testuser_123′,
      categories: [‘essential’, ‘analytics’],
      source: ‘banner’
      };

      fetch(‘https://api.yourcompany.com/webhooks/consent’, {
      method: ‘POST’,
      headers: {
      ‘Content-Type’: ‘application/json’,
      ‘X-Webhook-Signature’: generateSignature(testPayload)
      },
      body: JSON.stringify(testPayload)
      });
      `

      CDN and Caching Issues

      Step 1: Check CDN Configuration

      `
      SLOS → Troubleshooting → CDN Issues → Scan
      `

      CDN Compatibility Check:
      `json
      {
      “cdn_detected”: “Cloudflare”,
      “issues_found”: [
      {
      “type”: “cookie_caching”,
      “severity”: “high”,
      “description”: “CDN caching consent cookies incorrectly”
      },
      {
      “type”: “script_loading”,
      “severity”: “medium”,
      “description”: “CDN minifying SLOS scripts causing errors”
      }
      ],
      “recommended_fixes”: [
      “Exclude consent cookies from CDN caching”,
      “Disable script minification for SLOS files”,
      “Configure proper cache headers”
      ]
      }
      `

      Step 2: Fix CDN Cookie Issues

      `
      SLOS → Troubleshooting → CDN Issues → Cookie Configuration
      `

      CDN Cookie Settings:
      `apache

      Apache .htaccess for Cloudflare


      # Don’t cache consent cookies
      Header always set Cache-Control “no-cache, no-store, must-revalidate” env=SLOS_CONSENT
      Header always set Pragma “no-cache” env=SLOS_CONSENT
      Header always set Expires “0” env=SLOS_CONSENT

      Set environment variable for consent requests

      SetEnvIf Cookie “slosconsent” SLOSCONSENT
      `

      Step 3: Configure Cache Exclusions

      `nginx

      Nginx configuration for CDN

      location ~* \.(js|css)$ {
      # Exclude SLOS files from caching
      location ~* /wp-content/plugins/shahi-legalflowsuite/ {
      add_header Cache-Control “no-cache, no-store, must-revalidate”;
      add_header Pragma “no-cache”;
      expires 0;
      }
      }
      `

      Theme Integration Problems

      Step 1: Check Theme Compatibility

      `
      SLOS → Troubleshooting → Theme Issues → Compatibility Check
      `

      Theme Analysis:
      `json
      {
      “theme_name”: “Avada”,
      “compatibility_score”: 85,
      “issues_detected”: [
      {
      “type”: “css_conflict”,
      “severity”: “low”,
      “description”: “Theme styles slightly affecting banner appearance”
      },
      {
      “type”: “javascript_conflict”,
      “severity”: “medium”,
      “description”: “Theme scripts interfering with consent functionality”
      }
      ],
      “recommended_actions”: [
      “Add theme-specific CSS overrides”,
      “Adjust script loading order”,
      “Test with theme’s optimization features disabled”
      ]
      }
      `

      Step 2: Add Theme-Specific Fixes

      `
      SLOS → Troubleshooting → Theme Issues → Custom Fixes
      `

      Theme-Specific CSS:
      `css
      / Avada theme fixes /
      .fusion-body .slos-consent-banner {
      z-index: 10001; / Above Avada elements /
      }

      .fusion-body .slos-consent-banner .banner-content {
      max-width: 1200px; / Match theme container /
      }

      / Divi theme fixes /
      .etpbsection .slos-consent-banner {
      position: fixed !important;
      }

      .etpbsection .slos-consent-banner .banner-buttons {
      margin-top: 1rem;
      }
      `

      Step 3: Test Theme Integration

      `
      SLOS → Troubleshooting → Theme Issues → Integration Test
      `

      Integration Testing:

    17. Banner displays correctly
    18. Theme styles don’t conflict
    19. Responsive design works
    20. Theme builder compatibility
    21. Performance not affected
    22. Multi-Site Network Issues

      Step 1: Check Network Configuration

      `
      SLOS → Troubleshooting → Multi-Site → Network Check
      `

      Multi-Site Analysis:
      `json
      {
      “network_activated”: true,
      “sites_count”: 5,
      “shared_tables”: true,
      “issues_detected”: [
      {
      “type”: “table_sharing”,
      “severity”: “high”,
      “description”: “Consent logs not properly separated by site”
      },
      {
      “type”: “settings_sync”,
      “severity”: “medium”,
      “description”: “Settings not syncing across network sites”
      }
      ]
      }
      `

      Step 2: Fix Multi-Site Table Issues

      `
      SLOS → Troubleshooting → Multi-Site → Table Configuration
      `

      Multi-Site Table Setup:
      `php
      // Ensure proper table prefixes for multi-site
      global $wpdb;
      if (is_multisite()) {
      $wpdb->slosconsentlog = $wpdb->baseprefix . ‘slosconsent_log’;
      $wpdb->slosdsrrequests = $wpdb->baseprefix . ‘slosdsr_requests’;
      } else {
      $wpdb->slosconsentlog = $wpdb->prefix . ‘slosconsentlog’;
      $wpdb->slosdsrrequests = $wpdb->prefix . ‘slosdsrrequests’;
      }
      `

      Step 3: Configure Network Settings

      `
      SLOS → Troubleshooting → Multi-Site → Network Settings
      `

      Network Configuration:
      `json
      {
      “network_mode”: “coordinated”,
      “shared_settings”: [
      “cookie_categories”,
      “legal_documents”,
      “compliance_rules”
      ],
      “sitespecificsettings”: [
      “banner_appearance”,
      “portal_customization”,
      “notification_recipients”
      ],
      “dataisolation”: “tableprefix”,
      “sync_frequency”: “hourly”
      }
      `

      Monitoring Integration Health

      Step 1: Set Up Integration Monitoring

      `
      SLOS → Integrations → Monitoring → Configure
      `

      Integration Health Checks:
      `json
      {
      “google_analytics”: {
      “checkfrequency”: “5minutes”,
      “alertonfailure”: true,
      “failure_threshold”: 3
      },
      “facebook_pixel”: {
      “checkfrequency”: “10minutes”,
      “alertonfailure”: true,
      “failure_threshold”: 2
      },
      “api_endpoints”: {
      “checkfrequency”: “1minute”,
      “alertonfailure”: true,
      “failure_threshold”: 5
      },
      “webhooks”: {
      “checkfrequency”: “15minutes”,
      “alertonfailure”: true,
      “failure_threshold”: 2
      }
      }
      `

      Step 2: Integration Dashboard

      `
      SLOS → Dashboard → Integrations → Health Monitor
      `

      Health Dashboard Widgets:

    23. Service status indicators
    24. Response time graphs
    25. Error rate charts
    26. Data flow diagrams
    27. Alert history
    28. Support Resources

      Documentation

    29. Integration Setup
    30. API Documentation
    31. Webhook Configuration
    32. Help

    33. Integration troubleshooting FAQ
    34. Third-party service guides
    35. Plugin compatibility database
    36. Technical support forum

Share this article

Was this article helpful?

Help us improve our documentation

Still need help?

Our support team is ready to assist you with personalized guidance for your workspace.

Submit a support ticket