Log in to your WordPress dashboard and navigate to Appearance » Theme Editor. Now click the Theme Header (header. php) file on the right-hand side below the Theme Files section. Paste the tracking code you just copied from your Analytics profile before the closing /head tag.
Where do I put the tracking code in WordPress?
How do I add the tracking code to a WordPress website?
- Install the plugin: Header and Footer.
- Go to the configuration panel of the plugin.
- Under the “Page head and footer” tab, add the tracking code to the section which says “Code to be added to the HEAD section of every page”:
Where do I put the analytic tracking code?
According to Google: “The code should be added near the top of thetag 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.”
Where do I put analytics code Yoast?
Step 2: Install the Google Analytics plugin
- Go to Plugins > Add New.
- Search for Google Analytics.
- Click install to install the plugin.
- Activate the plugin.
- Access it from Settings > Google Analytics.
How do I add Google Analytics to a WordPress plugin?
To create this plugin, you’ll follow five steps:
- Check your active theme’s header. php file to ensure it includes the wp_head hook.
- Create a new file in your plugins folder.
- Get your analytics tracking code from the Google Analytics site.
- Add some code including the tracking code to your plugin.
- Activate the plugin.
How do I add Google Analytics code to my website?
Get started with Analytics
- Create or sign in to your Analytics account: Go to google.com/analytics.
- Set up a property in your Analytics account.
- Set up a reporting view in your property.
- Follow the instructions to add the tracking code to your websiteso you can collect data in your Analytics property.
How do I add a global tag to WordPress?
- Go to the Add New plugins screen in your WordPress Dashboard.
- Click the upload tab.
- Browse for the plugin file (global-site-tag-tracking.zip) on your computer.
- Click “Install Now” and then hit the activate button.
Where is the global site tag?
The global site tag snippet should be placed on all pages of your website, in thesection of your HTML pages.
Does Yoast have Google Analytics?
At Yoast, we’re known for giving you numerous tips to improve your site’s SEO. There’s this great free tool that gives a lot of insight into how your website’s traffic is doing: Google Analytics!