🧭 Overview
After installing the OTTO pixel on a Drupal site, Search Atlas may still show the code as unrecognized. Standard cache clearing alone is often not enough — Drupal requires a full cache flush to propagate header changes. This article walks you through every troubleshooting step to get your OTTO pixel recognized quickly.
✅ Before You Begin
Confirm the following before troubleshooting:
- You have admin access to your Drupal site and the Search Atlas platform.
- Your OTTO pixel code has been copied exactly from Search Atlas — no extra spaces or characters.
- You are editing the correct site in Search Atlas: navigate to OTTO SEO → All Sites (SEO Automation) in the left sidebar (URL: /seo-automation-v3) and confirm the domain shown matches your Drupal site.
📋 Step 1: Verify the Pixel Is in the Correct Location
The OTTO pixel must be placed inside the tag of every page on your site, not in the body or footer. In Drupal, the recommended way to do this is through your active theme's html.html.twig file or a dedicated header block, depending on your theme setup.
- Open your Drupal admin panel and go to Appearance → your active theme → Edit.
- Locate the html.html.twig template (or equivalent header template).
- Confirm the OTTO pixel code snippet appears immediately after the opening tag.
- Save your changes.
If you are using a module such as Head JS, Google Tag Manager, or a custom block to inject header scripts, ensure the OTTO pixel is placed directly in the template file, not inside GTM or any asynchronous script loader, as these can delay or block pixel recognition.
🚫 Step 2: Remove Any Conflicting GTM or Script Loader Code
Google Tag Manager and similar tools load scripts asynchronously after the page has already started rendering. This can prevent Search Atlas from detecting the OTTO pixel reliably.
- If you previously inserted the OTTO pixel inside a GTM container, remove it from GTM entirely.
- Add the pixel code directly to your theme template as described in Step 1.
- Double-check that no other plugin or module is moving or deferring scripts in the tag.
🗑️ Step 3: Flush All Drupal Caches (Critical Step)
This is the most common reason the OTTO pixel remains unrecognized after installation. Drupal caches rendered HTML, Twig templates, and asset aggregations aggressively. A standard cache clear may not rebuild all layers. You must perform a full cache flush.
Method A — Drupal Admin UI (Recommended):
- Log in to your Drupal admin panel.
- Go to Configuration → Development → Performance.
- Click Clear all caches.
- Wait for the confirmation message before proceeding.
Method B — Drush Command Line (More Thorough):
- Connect to your server via SSH.
- Navigate to your Drupal root directory.
- Run the command: drush cr (cache rebuild). This rebuilds all Drupal caches, including Twig compiled templates.
- If you use a CDN or reverse proxy (such as Cloudflare, Varnish, or Nginx caching), purge the cache at that layer as well.
Method C — Hosting-Level Cache:
- If your hosting provider (e.g., Pantheon, Acquia, WP Engine for Drupal) has its own caching layer, log in to your hosting dashboard and purge or flush the site cache separately. This step is required even after running Drush.
🔍 Step 4: Verify the Pixel Is Live on Your Site
After flushing all caches, confirm the pixel is visible in your page source before asking Search Atlas to re-verify:
- Open your website in a browser.
- Right-click anywhere on the page and select View Page Source.
- Use Ctrl+F (or Cmd+F on Mac) to search for otto or the beginning of your pixel code snippet.
- Confirm the code appears inside the section of the source.
If the code does not appear in the page source, the template change was not saved correctly or a caching layer is still serving an old version of the page. Repeat Steps 1 and 3.
🔄 Step 5: Re-Verify in Search Atlas
- In Search Atlas, go to OTTO SEO → All Sites (SEO Automation) in the left sidebar.
- Locate your connected site and open its OTTO settings.
- Click the Verify or Check Pixel button to trigger a fresh detection scan.
- Allow up to two minutes for the verification to complete.
If verification still fails after completing all steps above, your site may have a Content Security Policy (CSP) header blocking external scripts, or a module may be stripping unrecognized code from the tag. Check your Drupal security modules (such as Security Kit) for script restrictions.
⚠️ Common Mistakes to Avoid
- Clearing cache without flushing: Drupal's "Clear cache" button does not always rebuild Twig templates. Always use Drush cr or the Performance page flush for header changes.
- Inserting the pixel via GTM: GTM-loaded scripts are not reliably detected. Place the pixel directly in your theme template.
- Forgetting CDN or proxy cache: Changes to your HTML will not be visible until the CDN cache is also purged.
- Editing the wrong theme: Drupal may have a base theme and a sub-theme. Confirm you are editing the active sub-theme template.
💬 Need More Help?
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.