Where To Place Google Analytics Code In WordPress?

 width=1280

Where do I put Google Analytics code in WordPress?

Add Google Analytics to WordPress Without a Plugin

  • Click on Admin in the left taskbar.
  • In the property column, click Tracking Info, and then Tracking Code.
  • Now you can get the tracking code under the Website tracking section.
  • Step 2: Add the Tracking Code to the header.php file.

Where do I put the Google Analytics code?

The code should be added near the top of the <head> tag and before any other script or CSS tags, and the string ‘UA-XXXXX-Y’ should be replaced with the property ID (also called the “tracking ID”) of the Google Analytics property you wish to track.

How do I add Google Analytics to a WordPress plugin?

To create this plugin, you’ll follow five steps:

  1. Check your active theme’s header. php file to ensure it includes the wp_head hook.
  2. Create a new file in your plugins folder.
  3. Get your analytics tracking code from the Google Analytics site.
  4. Add some code including the tracking code to your plugin.
  5. Activate the plugin.

How do I add Google Analytics code to WordPress without plugins?

Install Google Analytics in WordPress Without Plugins – “

Leave a Reply

Your email address will not be published. Required fields are marked *