I Hate Quick Questions

Computer related issues and really random ones

  • Bootstrap
  • Tools
    • WordPress Minify Content
  • iPhone
  • Jailbreak
    • Evasi0n
  • PhP
  • Slow Computer
  • Storage
  • PC to Mac
  • Fix UTF8 Converter

Getting Google Analytics Demographic Data To Work With WordPress

January 13, 2014 / Leave a Comment

Google-Analytics-icon

So I have been having a heck of time trying to get the new Demographics part of Google Analytics (GA) to work with WordPress. First of all I do not use any plugins for Google Analytics and WordPress, it’s useless. And like many forum posts I have been reading plugin developers are taking their sweet time updating them to work with the new demographic features.

Let me show you the easiest way to add Google Analytics to your WordPress site without a plugin, then I’ll show you what I did to get it to work.

The easiest way to add analytics to any theme in WordPress:

  1. Go To Appearance > Editor
  2. On the right hand side click on footer.php
  3. Scroll all the way to the bottom and place your analytics code between the </body><!–Place Analytics Code Here–></html>
  4. Save and your done.

How to get Demographics to work with a WordPress site:

First you are going to want to enable the feature in Google Analytics

  1. Go to your domain in GA
  2. On the top right click on “Admin”
  3. Then in the center menu below click on “Property Settings”
  4. Where it says “Enable Demographics and Interest Reports” flip the slider from Off to On
  5. Save and Done

Now you want to get the new tracking code from GA to place that in your footer.php file. But guess what

Don’t use the code they give you, for me at least it does not work.

Use this code instead

<script type=”text/javascript”>

var _gaq = _gaq || [];

_gaq.push([‘_setAccount’, ‘UA-********-*’]);
_gaq.push([‘_setDomainName’, ‘yourdomainname.com’]);
_gaq.push([‘_trackPageview’]);

(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://’ : ‘http://’) + ‘stats.g.doubleclick.net/dc.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

Simply change theĀ UA-********-* with your account number and change yourdomainname.com to your domain name.

Wait about an hour and BAM! you will see data.

Have a nice day!

Related Posts

  • Finding That Sweet Spot To Increase CTR With Google Adsense + AnalyticsFinding That Sweet Spot To Increase CTR With Google Adsense + Analytics
  • How To Capitalize Categories In WordPress With php/mySQLHow To Capitalize Categories In WordPress With php/mySQL
  • Words with friends cheat – How to cheat your way to the topWords with friends cheat – How to cheat your way to the top
  • The Coolest Apps I Use Right Now To Help My Life With SEOThe Coolest Apps I Use Right Now To Help My Life With SEO
  • How in the heck do you get music off iTunes to somewhere else?How in the heck do you get music off iTunes to somewhere else?
  • Top Evasi0n7 Jailbreak Issue “Modifying rootfs…” then crashesTop Evasi0n7 Jailbreak Issue “Modifying rootfs…” then crashes
  • How To Define A String The Right Way With PHPHow To Define A String The Right Way With PHP
  • How to remove a profile on a mac from profile manager with the terminalHow to remove a profile on a mac from profile manager with the terminal
Posted in: Everything Tagged: Demographics, Google Analytics, Wordpress

Some fun side project sites

Scrabble Dictionary – Fun site I made as a joke for a friend.

Seamlessdesk – Help Desk Software I developed

Fix UTF8 Online Converter

Stalk Me

Recent Posts

  • MacOS Mojave installer keeps saying the file is damaged or corrupted, HELP!
  • proftpd keeps crashing or just stops working and I don’t know why
  • How to “For Realz” remotely install profile manager profiles silently with no MDM using Apple Remote Desktop
  • Trade Skill Master – Determining Market Value Region vs. Min BuyOut
  • Upgrade any Macbook Flash Drive even when The Apple Store says You Cant

Copyright © 2023 I Hate Quick Questions.

Me WordPress Theme by themehall.com

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok