Correct Location for Google Meta tag - No Pages Being Indexed

Topic summary

A Shopify store owner successfully verified their Google meta tag by placing it after the opening <head> tag (line 4), but is concerned about its placement since Google’s instructions suggest positioning it “before the first <body> section,” which appears further down in the code. Main issue: Despite correct verification, zero pages are being indexed after 24+ hours.

Troubleshooting steps provided:

  • Open browser DevTools Console (F12 or Ctrl+Shift+J)
  • Type dataLayer and press Enter
  • Check for “consent” or “default” keys with “granted” status to verify data collection

Current status: User encountered an error when checking dataLayer: “Uncaught ReferenceError: datalayer is not defined.” Support has requested the store URL for further investigation. The discussion remains ongoing with unresolved indexing and data collection issues.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

Hello team, I was able to successfully verify my Shopify adding my meta tag to right below the opening “head” section so in my case line 4. However if you look at the “Verify Ownership” popup where you copy the meta tag, it states “it should go in the <head> section, before the first <body> section” which would be a lot further down into the code. I just want to ensure that I have the tag in the correct location since it has been over 24 hours since I added the tag to my store and there are zero pages being indexed thus far.

Hi @CorporateBS , thanks for reaching out.

Based on your description, it seems the meta tag has been added correctly to your store. To ensure that data collection is working properly, you can perform a quick check using the steps below:

1. Open DevTools Console: Press F12 or Ctrl + Shift + J (on Windows) or Cmd + Option + J (on Mac) to open the Console in your browser’s developer tools.

2. Check the dataLayer: Inside the Console, type dataLayer and press Enter.

3. Inspect the values: Click on the resulting dataLayer object, then locate the values with keys named “consent” or “default”.

4. Verify the status: If you see the values listed as “granted”, it means data collection has been successfully triggered. If you encounter any issues during this process or notice that the status is already “granted”, feel free to share your store’s URL with us so we can investigate further and provide additional support.

I hope my information is helpful to you. Please let me know how it goes or if there’s anything else I can assist you with.

Liz

Hello LizHoang,

Thank you for the detailed response. When the Console popped up and I typed in the word dataLayer and hit ENTER, I received the following error “Uncaught ReferenceError: datalayer is not defined at :1:1”

Hi @CorporateBS , thanks for your feedback.

To investigate your case further, could you kindly share your store URL?

Thanks for your patience and cooperation in the meantime.

Liz