0
Answered

Can I use the Custom Header HTML setting to insert the code for Google Analytics

Stephen Day 6 months ago • updated by christopherm (Customer Community) 6 months ago 4

I am planning on tracking my website traffic with Google Analytics. To do so, there is custom code that must be inserted at the <head> location. Can I do that using the "Custom Header HTML" feature under the "customize-advanced-header" setting?

Hi Stephen,

Instead of installing Analytics code and then verifying search console and adding facebook codes, you should use Google tag manage once and place its code in the head area then you will be able to add any type of code through Google tag manager,

For adding analytics code you need to put in under <head> area. but if you want to add Google Analytics WordPress website then this guide will help you.

Answered

Hello Stephen.

Thanks for posting your question regarding adding HTML within the <head> tag. You are correct, that is where you would add that code.

I hope this helps!

Sincerely,

Carlos D.

I can't find the head tag anywhere nor customize advance header option. Where is it? I looked under Customize, but I don't see it.

I'd advise using a WordPress plugin for adding your Analytics code. This is not only the easiest but also safest option.

You will not be able to find the HTML <head> element in the Customizer. The Customizer only controls the front-end look of the site. You would need to edit the core theme files, but this is not advised unless you are familiar with PHP and WordPress theme template file structures (and how to use child themes).