A browser console script to verify that Umbraco Engage is properly configured and functioning on your website.
Note: Headless Engage setups are not supported.
Overview
This script performs automated checks to ensure that Umbraco Engage is correctly installed and configured. It validates critical configuration aspects and optional features.
Features
The script checks:
✅ Ping Script Available - Verifies the ping script is present in the HTML
✅ Ping Endpoint - Tests the /umbraco/engage/pagedata/ping endpoint (should return 204)
✅ Output Caching - Confirms output caching is disabled by comparing pageviewIds
📊 Client-Side Analytics - Checks if analytics script is installed (recommended)
📊 Analytics Loaded - Verifies the analytics script loaded properly
🔧 GA Blocker Detection - Optional feature check
🔧 GA4 Bridge - Optional feature check
Usage
Step 1: Open Your Website
Navigate to the website you want to check in your browser.
Step 2: Accept Cookies
If a cookie consent banner appears, accept all cookies.
Step 3: Reload the Page
Reload the page to ensure all scripts are loaded.
Step 4: Open Developer Console
Windows/Linux: Press F12 or Ctrl+Shift+J
Mac: Press Cmd+Option+J
Step 5: Run the Script
Copy the entire content of umbraco-engage-healthcheck.js file
Paste it into the console
Press Enter
Step 6: Review Results
The script will output a table showing the results of each check.
TRUE = Check passed ✅
FALSE = Check failed ❌
Interpreting Results
Critical Checks (Must be TRUE)
1_Ping_Script_Available: The Engage ping script must be present
2_Ping_Successful: The ping endpoint must respond with status 204
3_OutputCachingDisabled: Different pageviewIds should be returned on each request
If any of these return false, Umbraco Engage will not function correctly.
Recommended Check
4_ClientSideAnalyticsScript_Installed_OPTIONAL: Required for client-side analytics (time on page, scroll depth, etc.)
5_ClientSideAnalyticsScript_Loaded_Only_If_4_is_installed: Confirms the analytics script loaded successfully
Optional Checks
6_GA_BlockerDetection_Script_Installed_OPTIONAL: For detecting ad blockers
7_GA4_Bridge_Script_Installed_OPTIONAL: For Google Analytics 4 integration
Troubleshooting
Ping Endpoint Returns False
Ensure the /umbraco/engage/pagedata/ping endpoint is accessible
Check firewalls or network restrictions that might block the endpoint
Output Caching Returns False
Disable output caching on your CDN for pages using Umbraco Engage
Each request must generate a unique pageviewId
See: CDN Recommendations
Checking the Visitor Cookie
The script cannot check for the umbracoAnalyticsVisitorId cookie due to browser security restrictions. You must check this manually:
Chrome/Edge
Open Developer Tools (F12)
Go to the Application tab
In the left sidebar, expand Cookies under Storage
Click on your website's domain
Look for umbracoAnalyticsVisitorId in the cookie list
Firefox
Open Developer Tools (F12)
Go to the Storage tab
Expand Cookies in the left sidebar
Click on your website's domain
Look for umbracoAnalyticsVisitorId
The cookie should be present for Umbraco Engage to function properly.
Requirements
Umbraco Engage installed on your Umbraco website
Modern web browser with developer console access
Cookie consent given (if applicable)
License
MIT License - Feel free to use and modify as needed.
Resources
There is also a video that explains how to use this, see it here:
https://drive.google.com/file/d/1pOSRrhiNjiCziKBexCN7v8uIJWsvo8zA/view