🔍 Understanding the Conflict
When you install the Search Atlas tracking script through Google Tag Manager (GTM) on a site that uses a prerender service (such as Prerender.io or a similar solution), the script can interfere with how the prerender service processes and caches pages. This typically results in two symptoms:
- The Search Atlas plugin fails to verify the script installation.
- The site behaves unexpectedly or breaks for certain users or bots.
This happens because prerender services intercept requests from crawlers and serve a pre-rendered static version of the page. If GTM fires the Search Atlas script during this render cycle, it can disrupt the prerender output or cause the verification check to receive an incomplete page response.
⚙️ How Prerender Services Work With GTM
Prerender services detect bot or crawler user agents and serve them a cached, JavaScript-free HTML snapshot of the page instead of the live version. GTM and any tags it loads — including the Search Atlas script — are typically JavaScript-based. This means:
- The Search Atlas script may not execute at all in the prerendered snapshot.
- The verification check, which looks for the script on the live page, may query a cached snapshot that does not include the script.
- GTM itself may be stripped or blocked during the prerender process, preventing the tag from firing.
✅ Recommended Fix: Exclude the Search Atlas Script From Prerender Caching
The most reliable solution is to ensure your prerender service does not interfere with the page when the Search Atlas verification check runs, and to configure GTM so the script loads correctly for real users. Follow these steps:
- Add the Search Atlas script directly to the page source (recommended). Instead of loading the script through GTM, paste it directly into the
<head>section of your site's HTML template. This ensures it is always present in the page source, regardless of how the prerender service handles JavaScript. - Whitelist the script in your prerender configuration. If you must keep the script in GTM, log in to your prerender service dashboard and add a rule to exclude or pass through requests that include the Search Atlas verification user agent or the specific URL used for verification checks. Refer to your prerender provider's documentation for exact steps.
- Configure GTM to fire on all environments. Check your GTM container's trigger settings to confirm the Search Atlas tag is not restricted to specific environments or conditions that would prevent it from firing during a verification request.
- Re-run the plugin verification in Search Atlas. Once the script is in place and the prerender conflict is resolved, return to your Search Atlas workspace and trigger the verification check again to confirm the installation is recognised.
🧪 Testing Your Setup
Before re-running the official verification, test the fix manually to save time:
- Open your browser's developer tools, go to the Network tab, and reload the page. Search for the Search Atlas script to confirm it loads in the page source.
- Use a tool such as Google's Rich Results Test or a user-agent switcher to simulate a crawler request to your page. Check whether the script appears in the rendered output.
- Clear your prerender cache after making changes so the service regenerates snapshots with the updated page source.
💡 Additional Tips
- If your prerender service uses a cache TTL (time to live), wait for the cache to expire or manually purge it before re-testing.
- Some prerender services allow you to block specific JavaScript files from executing during render. Make sure the Search Atlas script domain is not on that blocklist.
- If you manage multiple client sites with this setup, apply the direct-to-source installation method as your default to avoid this conflict across all properties.
💬 Still Need Help?
If you have followed the steps above and the plugin still fails to verify, or if your site continues to break after making these changes, our technical team can investigate your specific configuration. If you need further assistance, open the chat widget in the bottom-right corner of the platform and type human teammate to be connected with a member of our team.