Overview
Search Atlas provides a dynamic optimization script that you can deploy through Google Tag Manager (GTM). In some cases, the script format used may not pass GTM's built-in validation, which can prevent you from publishing the tag. This article explains what to check and how to get assistance resolving GTM script validation issues.
Why the Script May Fail GTM Validation
GTM runs a syntax and security validation check on all Custom HTML tags before publishing. Depending on the script format provided, GTM's validation engine may flag the script and block publishing. If you encounter a validation error when attempting to publish a Custom HTML tag containing the Search Atlas dynamic optimization script, this is a known compatibility consideration that our team can help resolve.
What to Try in GTM
If you are experiencing GTM validation errors with your Search Atlas dynamic optimization script, try the following general troubleshooting steps:
- Confirm you are using a Custom HTML tag type in GTM — other tag types may not support injected third-party scripts correctly.
- Check that the script content you have pasted is complete and not truncated.
- Ensure your trigger is configured (typically a Page View trigger on All Pages).
- Click Save, then attempt to Submit again to republish.
If the validation error persists after these checks, the specific script format you are using may need to be adjusted. Contact the Search Atlas support team with the details below so they can provide the correct script format for GTM.
What to Have Ready When Escalating
To help our team resolve your GTM validation issue quickly, please have the following information ready:
- The exact error message displayed in GTM when validation fails.
- The script content you are attempting to use (or a description of where you obtained it in your Search Atlas account).
- Your GTM container ID.
- The URL of the website where the script is being deployed.
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.