Manual placement of the tracking code

Version 4.0 of Google Analytics for WordPress introduced the new asynchronous tracking code. This tracking code works best when it’s placed in the <head> section of the site. When you want to place it in a different spot though, you’re very welcome to do so, using the following snippet:

if ( function_exists( 'yoast_analytics' ) ) {

After you’ve done this, go into your Google Analytics for WordPress settings, and set Tracking code location to “manual”.