256 Kilobytes

Forum in Content-Management Systems | By Some Guy

Published

187 views, 1 RAM, and 1 comment

Profile Photo - Some GuySome GuyBasic Subscriber

I want to set up Google analytics on my Wordpress website.

What's the easiest way to add the code?

Thanks

Users Who Have Downloaded More RAM:
Some Guy (1 year ago)
🐏 ⨉ 1
Posted by Some Guy 1 year ago 🕓 Posted at 04 December, 2018 19:31 PM PST

This is a debug account.

Profile Photo - Hash BrownHash BrownInternet ActivistEnglandStaff

Hello,

I find adding it to the themes functions file to be easiest, if you're editing the core theme you might want to set up a child theme before doing so.

Paste this onto the functions.php file

<?php
add_action('wp_head', 'wpb_add_googleanalytics');
function wpb_add_googleanalytics() { ?>
 
// Paste your Google Analytics code here
 
<?php } ?>

If you're not comfortable with code the next best way is the monster insights plugin which handles everything for you and is pretty hard to mess up.

Double check your analytics installation, doing it incorrectly will give you incorrect data. The most common mistake is including it twice (which drops your bounce rate to 0%).

You can use this online tool to check your GA install:

http://www.gachecker.com/

Download more RAM. 🐏 ⨉ 0Posted by Hash Brown 1 year ago 🕓 Posted at 05 December, 2018 14:37 PM PST

"THAT DOG IS GETTING RAPED" - Terry A. Davis

Post a New Comment

Do you like having a good time?

Register an Account

You can also login to an existing account or reset your password. All use of this site is subject to the terms of service and privacy policy.

Read Quality Articles

Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.

View Articles →

Argue with People on the Internet

Use your account to explain why people are wrong on the Internet forum.

View Forum →

Vandalize the Wiki

Or don't. I'm not your dad.

View Wiki →

Ask and/or Answer Questions

If someone asks a terrible question, post a LMGTFY link.

View Answers →

Make Some Money

Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.

Register an Account

Forum— Read More

Find more related content below!

Read More: