Title: insert google tags to
Last modified: February 3, 2021

---

# insert google tags to

 *  [alexandrarosi](https://wordpress.org/support/users/alexandrarosi/)
 * (@alexandrarosi)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/insert-google-tags-to/)
 * Hello,can you tell me how to add code to those 3 categories?
    -in the <head> 
   of the page -after the opening <body> tag -in your website’s global footer, right
   above the closing HTML <body> tag.
 * I inserted the first google tag to header.php after <head> and saved it but nothing
   happened
 * Thank you
    -  This topic was modified 5 years, 3 months ago by [alexandrarosi](https://wordpress.org/support/users/alexandrarosi/).
    -  This topic was modified 5 years, 3 months ago by [alexandrarosi](https://wordpress.org/support/users/alexandrarosi/).
    -  This topic was modified 5 years, 3 months ago by [alexandrarosi](https://wordpress.org/support/users/alexandrarosi/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/insert-google-tags-to/#post-13997069)
 * Your answer depends upon the details of your theme.
    Look at your theme files
   and see how it assembles your website’s pages, in your theme folder you will 
   likely have a file “header.php”, it will produce your “<head>” tag, and then 
   call a hook function such as “afterhead();” (or similar), or maybe just “wp_head();”.
   See how it is defined, it will tell you how to add a function to this hook. Similarly
   after the “<body>” tag it calls “wp_body_open();”. In each case find the hook
   that is invoked in that context. Now add functions to these hooks, could be done
   in a plugin, but more likely in the theme’s “functions.php” file, to do this 
   properly you need to be working in a child theme, details here: creating a child
   theme [http://codex.wordpress.org/Child_Themes](http://codex.wordpress.org/Child_Themes)
   if this does not suit you then this may help: [https://github.com/woothemes/theme-customisations](https://github.com/woothemes/theme-customisations)
 * I have given specifics for the twentynineteen theme, the specifics may vary.
 *  Thread Starter [alexandrarosi](https://wordpress.org/support/users/alexandrarosi/)
 * (@alexandrarosi)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/insert-google-tags-to/#post-13997106)
 * Thank you!!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘insert google tags to’ is closed to new replies.

## Tags

 * [body](https://wordpress.org/support/topic-tag/body/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [footer](https://wordpress.org/support/topic-tag/footer/)
 * [head](https://wordpress.org/support/topic-tag/head/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [alexandrarosi](https://wordpress.org/support/users/alexandrarosi/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/insert-google-tags-to/#post-13997106)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
