All things Shopify and commerce
I am looking to add my google tag to my website, I have followed the manual instructions and pasted the code after the <head> element, is this correct? I have attached a photo, google analytics hasn't recognised it yet so wondering if I have done it wrong?
Solved! Go to the solution
This is an accepted solution.
Hi, @ecoepc!
Welcome to Shopify Community and thank you for your question.
This is almost right, though you've pasted the tag code right after the closing element of the head tag as denoted by </head>.
The opening element, which you will likely find several lines up will look like <head>. The secret is to paste your code in between these two, which would mean it is in the header element. My recommendation is to find the opening <head>, and hit enter to add a line beneath it in which to paste your code.
Google should then be able to recognize it immediately once done correctly.
Let me know if you have further questions!
Olivia | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
This is an accepted solution.
Hi, @ecoepc!
Welcome to Shopify Community and thank you for your question.
This is almost right, though you've pasted the tag code right after the closing element of the head tag as denoted by </head>.
The opening element, which you will likely find several lines up will look like <head>. The secret is to paste your code in between these two, which would mean it is in the header element. My recommendation is to find the opening <head>, and hit enter to add a line beneath it in which to paste your code.
Google should then be able to recognize it immediately once done correctly.
Let me know if you have further questions!
Olivia | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Thank you so much!
I'm so glad I could help, @ecoepc!
I appreciate you taking the time to reply and marking my reply as an accepted solution for future readers. If you have further questions around this, please don't hesitate to leave another comment in our thread.
Warm regards,
Olivia | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
dear ecopec would you be so kind of send me an screenshot of how you set up the code i am new into this and i am super lost also could please send me the code without knowing i closed the page and i cnt get it now pleasd i really apreaciate your help kind regards
Hi, @everseller!
Thanks for joining our thread. Maybe I can help you out with this.
For starters, you should have your own unique code for tracking purposes so it's important to use the one provided to you by Google during set-up.
Check out this Google Support article for instructions on setting up various types of google tags for reference. Once you've determined that, you can continue to set up with either instruction provided in this forum thread.
Warm regards,
Olivia | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hello Olivia
Sorry to trouble you, wanted to ask if this solution would be the same for me with a G-XXXXXXX tag. I have inserted the tag above the closing head in liquid theme as per instructions but unsure if this is correct as tag is showing in the top left of my homepage. Data seems to be flowing between site and Google.
Thank you
Dave
Thanks so much for connecting with me, @DaveWood!
Yes, that is correct - the instructions would be the same for you in your theme as well. Though if it is displaying on the actual page's properties then I suspect it is in the <body> tag as opposed to the <header>.
If you're comfortable doing so, can you show me a screenshot of the tag in the liquid so I can get a general sense of where it currently sits? Then I can better advise what the next steps should be. Also, be sure to exclude any personal information from your screenshot.
I look forward to your reply,
Olivia | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Morning Olivia
Please find attached screenprint of where G-tag is, installation instructions tell you to put it above the closing <head>, which I think I did and data seems to flow but it appears on my Store, top-left corner. I have tried the tag above the opening head as well, same outcome.
Hope you can enlarge this, let me know and I will email it to you.
Thanks for your help
Dave
Thanks for your reply, @DaveWood.
My apologies I definitely misunderstood what you meant earlier by a G-***** code. Based on your screenshot you are trying to set up a Google Analytics 4 code. To use this newer version you must install the Google Channel through Shopify.
In fact, we have step-by-step instructions you can follow to correctly set up this code. Please check out the full documentation at this link. After setting up the Google Channel as per prompts in your Admin, follow these steps:
At that point, make sure to remove it from your code entirely. I trust that will resolve your issue, but let me know if anything else comes up.
Warm regards,
Olivia | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hello Olivia
Perfect, easy when you have the right instructions, I was unaware it was a GA4 tag so probably trying to set it up incorrectly.
Everything seems fine now, I set the liquid theme back to it's original setting and then added GA4 so no tag added to theme.
Thank you so much for your help as this has been driving me nuts for days trying to work it out! 🙂
Take care
Dave
Thank you for getting back to me and confirming that worked for you, @DaveWood! I'm so glad I could help, but do let me know if you have further questions about setting up your store.
We also have this helpful launch checklist I encourage you to review in the next few days as you prepare to open your store's virtual doors.
Warm regards,
Olivia | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024