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 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.”
How do I add a GA code to WordPress?
Once your child theme is active, you’ll need to paste your Google Analytics Tracking Code right before the closing head> tag in your header. php file. Then, make sure to click on the Update File button. Google Analytics tracking code is now being added to WordPress.
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.
Where do I put the tracking code in HTML?
As per Google Analytics’ instructions, your tracking code should always be placed just after the opening of thetag of the website. The code placement will differ from website to website.
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.
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 to WordPress Divi?
Tutorial: Setting up Google Analytics on a Divi Website, Step by Step
- Step 1: Login or Create a Google Account.
- Step 2: Create a Google Analytics Account.
- Step 3: Create a Google Analytics Property for Your Website.
- Step 4: Get Your Global Site Tag Tracking Code.
- Step 5: Add Your Global Site Tag to Your Divi Website.
Where should the Analytics tracking code be placed in the HTML of a webpage for data collection?
The Analytics tracking code should be placed Just before the closing tag of your website in the HTML of a webpage for data collection.
Do I need to put Google Analytics code on every page?
You do need to put Google Analytics on every page that you are interested in tracking. Depending on what website builder you are using, it is done automatically for you.