How to Add Google Analytics or Ad Tracking Tags
If you're running Google Ads or want to track website analytics with Google Analytics, you'll need to add a tracking tag to your site. This article shows you how.
Before You Begin
You'll need your tracking tag code from Google. This is usually a JavaScript snippet that looks like:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
Steps to Add Your Tracking Tag
Step 1: Go to Site Settings
- Go to Sites in the left sidebar
- Select your site
- Look for Settings or Advanced Settings
Step 2: Find the Tracking Code Section
- Look for a section called "Advanced Settings", "Custom Code", or "Head Scripts"
- This is where you can add code that will be inserted into your site's
<head>section
Step 3: Add Your Tag
- Paste your Google tracking tag code into the appropriate field
- Make sure you paste the complete code snippet
- Save your changes
Step 4: Publish Your Site
- After adding the tag, publish your site
- The tracking code will be active on all pages
Verifying Your Tag Works
For Google Analytics:
- Go to your Google Analytics account
- Navigate to Real-time reports
- Visit your website in another tab
- You should see yourself as an active user
For Google Ads:
- Go to your Google Ads account
- Find the conversion action you set up
- Check the status - it should show "Recording conversions" or similar
- Note: It may take a few hours for Google to verify the tag
Common Tags You Might Add
- Google Analytics (GA4): Website traffic and behavior analytics
- Google Ads Conversion Tracking: Track when ad clicks lead to actions
- Facebook Pixel: Track conversions from Facebook ads
- Other Analytics Tools: Hotjar, Clarity, etc.
Troubleshooting
Tag not working?
- Make sure you published your site after adding the tag
- Clear your browser cache and check again
- Verify the tag code is complete and correctly copied
Getting errors?
- Check for any typos in the tag ID
- Make sure the code wasn't accidentally modified when pasting