Title: Adding Google Analytics &amp; Google Search Console code
Last modified: July 4, 2018

---

# Adding Google Analytics & Google Search Console code

 *  [pjr101](https://wordpress.org/support/users/pjr101/)
 * (@pjr101)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-google-analytics-google-search-console-code/)
 * Hi,
 * I’ve just set up a new website with the Generate Press free theme.
 * I need to add Google Analytics tracking code, and Google Search Console verification
   code.
 * Can someone please tell me how and where I can do this in a simple way?
 * Cheers

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

 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-google-analytics-google-search-console-code/#post-10463618)
 * Hi there,
 * This should help: [https://wordpress.org/support/topic/how-to-add-google-analytics-code-without-plugin/](https://wordpress.org/support/topic/how-to-add-google-analytics-code-without-plugin/)
 * Let me know.
 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-google-analytics-google-search-console-code/#post-10464065)
 * Here’s the specific link, just to save you a couple clicks: [https://wordpress.org/support/topic/header-php-is-empty-in-generatepress/#post-10172404](https://wordpress.org/support/topic/header-php-is-empty-in-generatepress/#post-10172404)
 *  Thread Starter [pjr101](https://wordpress.org/support/users/pjr101/)
 * (@pjr101)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-google-analytics-google-search-console-code/#post-10465833)
 * Thank you to you both.
 * From what I can see – that mentions the Google Analytics function –
 * add_action( ‘wp_head’, ‘tu_add_analytics’ );
    function tu_add_analytics() { ?
   > Your GA code in here <?php }
 * What does the function look like for Google Search Console?
 *  Thread Starter [pjr101](https://wordpress.org/support/users/pjr101/)
 * (@pjr101)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-google-analytics-google-search-console-code/#post-10466690)
 * Also another question, if I am using Code Snippets plugin, how exactly do you
   add a new snippet?
 * With Google Search Console as an example, would I name the snippet “Google Search
   Console Verification”, then just put the function (like the GA function code 
   above) in the code section and click save changes?
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-google-analytics-google-search-console-code/#post-10467164)
 * It should be in `wp_head` as well.
 * Can you copy and paste the code here?
 * Did Google provide instruction on where to insert it?

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

The topic ‘Adding Google Analytics & Google Search Console code’ is closed to new
replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Leo](https://wordpress.org/support/users/leohsiang/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/adding-google-analytics-google-search-console-code/#post-10467164)
 * Status: not resolved