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 should the Google Analytics code be pasted?
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 paste a tracking code in WordPress?
Click Editor, located under Appearance in the menu on the left. Click the header. php file in the menu on the right. Paste your tracking code immediately before the closing tag.
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 should you paste your Google Analytics tracking code during the manual installation process?
Google’s official recommendation for adding the Google Analytic tracking code is place the tracking code in the HEADER SECTION () of the website.
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.
Where do I paste Google Tag Manager code?
Add Google Tag Manager container code to the website Follow the instruction and place the first code (which is surrounded by