Skip to main content
Below you’ll find diverse information to help you with testing, valiadtion, touble-shooting and measureing performance of your Onsite set-up.

Testing and validation

Here is some useful information to help you with testing and validation.

Using the Chrome Extension

  1. Install the Voyado Chrome Extension
  2. Navigate to your website
  3. Wait for the page to fully load
  4. Click the Voyado extension icon
  5. Verify that the script is detected
The extension only detects if the script is loaded on the current page. It doesn’t validate triggers or data.

Browser Console Checks

Use this URL parameter to activate debug mode:
https://yoursite.com/?voyado-debug
Open your browser’s developer console (F12) and check:
  • The script loaded successfully: typeof redeal === ‘function’ — Should return: true
  • The widget is open: typeof IsRedealOpen === ‘function’ && IsRedealOpen(‘cornerwidget’) — Should return: true if cornerwidget is open
  • There are script errors: Look for red errors in the console. Common issues:

Clear testing session

Use this URL parameter to reset your test session:
https://yoursite.com/?voyado-clear
This clears local and session storage, allowing you to test onsite messages as an unidentified/new visitor.

Testing checklist

  • Script loads on all intended pages
  • Only one script call loads per pageview
  • Cornerwidget appears on landing pages
  • Cornerwidget does NOT appear on checkout/cart pages
  • Open widgets close when navigating to checkout (SPAs only)
  • Checkout tag fires on order confirmation with correct data
  • Login tag fires when user logs in
  • Console shows no JavaScript errors
  • All GTM variables return expected values
  • Onsite message URL links work and trigger onsite messages
  • Onsite messages only trigger on configured domains
  • Test with ?voyado-clear to simulate new visitors
For implementations using Google Tag Manager, using GTM’s Preview mode to ensure the tags are correctly installed and that triggers are firing appropriately with complete and correctly formatted variables is highly recommended.

Network tab verification

In browser DevTools > Network tab:
  1. Filter by “redeal”
  2. Verify redeal.js loads successfully (Status: 200)
  3. Check that POST requests to Voyado API return 200 status
  4. Verify request payloads contain expected data

Troubleshooting

Here are some tips to help with trouble-shooting of onsite messaging.

Script not loading

Symptoms:
  • Chrome extension shows no detection
  • typeof redeal returns undefined
  • No network requests to static.redeal.se
Possible causes:
  1. Content Security Policy (CSP) blocking the script
Solution: Add https://static.redeal.se to your CSP script-src directive
  1. Ad blocker or privacy extension
Solution: Disable extensions for testing or whitelist your domain
  1. Firewall blocking external scripts
Solution: Whitelist static.redeal.se in your firewall rules
  1. Incorrect GTM trigger configuration
Solution: Check trigger fires on page load using GTM Preview mode
  1. Script tag syntax error
Solution: Validate HTML, ensure no extra characters in script tag

Widget not appearing

Symptoms:
  • Script loads but no widget visible
  • Console shows no errors
Possible causes:
  1. Domain not configured in Onsite Manager
Solution: Verify your domain is added to the onsite message configuration
  1. Onsite message not active
Solution: Check onsite message status in Onsite Manager
  1. Onsite message already shown to this user
Solution: Test with ?voyado-clear URL parameter
  1. Wrong tag name
Solution: Verify tag name in code matches Onsite Manager configuration
  1. Z-index conflict
Solution: Check if widget is rendering but hidden behind other elements

Conversion not tracking

Symptoms:
  • Checkout tag fires but conversions don’t appear in reports
Possible causes:
  1. Variables returning null or undefined
Solution: Use GTM Preview to verify variable values
  1. Incorrect data types
Solution: Ensure total, revenue are strings, coupons is array
  1. Currency code format
Solution: Use ISO 4217 codes (SEK, USD, EUR, etc.)
  1. Race condition (script triggers before GTM variables populate)
Solution: Add a small delay or ensure dataLayer pushes before tag fires

GTM variables not populating

Symptoms:
  • GTM Preview shows undefined or null variable values
Solutions:
  1. Verify dataLayer structure matches your variable configuration
  2. Check that dataLayer.push() happens before page load events
  3. Use “Data Layer Variable” type (not “JavaScript Variable”) in GTM
  4. Test dataLayer in console: console.log(dataLayer)

SPA issues

Widget persists on checkout page:
  • Ensure Hide tag is implemented and triggering correctly
  • Verify Hide tag trigger uses same event type as other triggers
  • Check GTM Preview to confirm Hide tag fires
Widget not appearing after navigation:
  • Confirm Cornerwidget tag triggers on virtual pageviews
  • Verify history change events are captured in GTM
  • Check that custom events fire consistently
Script loaded multiple times:
  • Ensure if (typeof redeal !== ‘function’) wrapper is present
  • Check GTM Preview for duplicate tag fires

Console error messages

Common errors and solutions:
ErrorCauseSolution
Failed to load resource: https://static.redeal.se/…Script blockedCheck CSP, firewall, ad blockers
redeal is not a functionScript not loaded before callEnsure script loader runs first
IsRedealOpen is not definedScript not fully initializedAdd conditional check: typeof IsRedealOpen === ‘function’
Cannot read property ‘email’ of undefinedMissing data objectVerify GTM variables are defined

Performance & security

Performance and security can be improved by following these tips.

Content Security Policy (CSP)

If your site uses CSP headers, add these directives:
Content-Security‐Policy:
  script-src 'self' https://static.redeal.se;
  connect-src 'self' https://*.redeal.se;
Without these directives, the script will be blocked by the browser.

Script loading strategy

The Voyado script uses async loading to minimise performance impact:
a.async=1;  // Script loads asynchronously
Benefits:
  • Non-blocking: Page rendering continues while script loads
  • Fast: Script hosted on CDN with global distribution
  • Cached: Browser caches script for subsequent visits
Performance Impact:
  • Initial load: ~15-25 KB (minified and gzipped)
  • Subsequent loads: 0 KB (cached)
  • Page load delay: <50 ms on average

Best practices

Do:
  • Load script on all relevant pages (cornerwidget is reusable)
  • Use async loading (included in implementation)
  • Implement proper CSP directives
  • Test on staging before production
  • Monitor console for errors after deployment
Don’t:
  • Block page rendering waiting for script
  • Load script multiple times on same page (use conditional checks for SPAs)
  • Hardcode customer data in JavaScript (security risk)
  • Skip testing on different browsers
  • Forget to update CSP when implementing

Data privacy

Email handling:
  • Emails are transmitted over HTTPS
  • Never expose emails in URLs (use POST data)
  • Comply with GDPR/privacy regulations in your region
  • Inform users about data collection in your privacy policy
Session data:
  • Script uses local storage and session storage
  • Data is stored client-side only
  • Use ?voyado-clear to manually clear stored data

Browser compatibility

The script is compatible with:
  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)
  • Mobile browsers (iOS Safari, Chrome Mobile)
Not supported:
  • Internet Explorer 11 and earlier

Additional resources

Onsite Manager: Configure onsite messages, sites/domains and view analytics Chrome Extension: Download here GTM Documentation: Google Tag Manager Help Voyado Support: Contact your Voyado representative for technical assistance If you have questions or encounter issues not covered in this guide, reach out to Voyado support or your Voyado representative.