Where do I add my Google Analytics Tracking code on a WordPress Site?

January 31, 2008

If your website is built using a package like WordPress, Joomla/Mambo, Durpal or anyone of a number of other pre-built CMS-type applications then I am that there may be a little confusion as to where the tracking code goes. The confusion exists because the PHP modules that WordPress uses form a complete page. For instance let’s say that the main page of your WordPress is constructed from a Header PHP object, Page Template PHP object and a Footer PHP object (all included in the WordPress Package available from WordPress.org) it is easy to get confused as to just where the code goes. On the Google Analytics Help site it asks you to install the code just before the end of the </body> tag. Here is an example as to what that looks like in WordPress…

<div id=”footer”>

 Your Footer Code

<?php wp_footer(); ?>

 

<!– Start of Google Analytics GA.JS Tracking Code –>

<script type=”text/javascript”>

var gaJsHost = ((”https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);

document.write(unescape(”%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));

</script>


<script type=”text/javascript”>

var pageTracker = _gat._getTracker(”UA-XXXXXXX-X”);

pageTracker._initData();

pageTracker._trackPageview();

</script>

<!– End of Google Analytics GA.JS Tracking Code –>


</body>

</html>

Keep in mind that Joomla/Mambo, Durpal and other website package deployment tools are different but if you run into any issues please post a question and we’ll get back to you with an answer.

Luc

Installing & Configuring WordPress

January 24, 2008

As I wrote about yesterday WordPress is a great site development & management tool that most people who setup a website should consider as an option. Now I myself have been a big supporter of WordPress for the past few years. Having products like WordPress in the marketplace that have large developer bases help people enter the era of online business development.

I remember a few years ago when the options were limited and you had to know a good amount of code to produce a decent website and now it couldn’t be further from the true, thanks in part to Blogging but also the development of CMS systems as a whole. I can only imagine what the next 10 years will look like.

Installing WordPress is as easy as 1 2 3!

All you need to install WordPress is a Linux/Unix based server, access to mySQL database technology and the will to try something non-windows related.

  • Unzip the package you download from WordPress.org
  • Create a mySQL database on your web server and modify the privileges for accessing it
  • Rename the file “wp-config-sample.php” to “wp-config.php” and change the following lines of code in your “wp-config.php” file to match you’re mySQL database settings

// ** MySQL settings ** //

define(’DB_NAME’, ‘putyourdbnamehere‘); // The name of the database

define(’DB_USER’, ‘usernamehere‘); // Your MySQL username

define(’DB_PASSWORD’, ‘yourpasswordhere‘); // …and password

define(’DB_HOST’, ‘localhost‘); // 99% chance you won’t need to change this value

define(’DB_CHARSET’, ‘utf8′);

define(’DB_COLLATE’, ”);

  • After you edit the “wp-config.php” page you will need to upload it to your website.
  • Lastly you will need to the “/wp-admin/install.php” script by entering it into your browser using the following path “http://www.yourwebsite.com/wp-admin/install.php”.

Your website should be ready to rock and roll after that in no time flat! Enjoy your newly installed WordPress CMS System and if you have any issues doing the install post them here.

Luc

Fellow WordPress’er

What Did You Build Your Website With?

January 23, 2008

I built PureWebAnalytics and launched it nearly a year ago (tomorrow actually). I originally built it using WordPress  because it was a solid platform that I had a good amount of experience using, also the fact that it had and still has a huge contributing developer community interested me because a lot of people know the architecture behind it.

This prompts me to ask, “What do you use to run your website, forum, portal or other various website properties?”

There is a whole world of options when it comes to developing websites and web applications online from Durpal to WordPress, IPB (Invision Power Board) to VBulletin and the list goes on.

Some people who run online businesses choose to have a programmer or software developer build their system specific to their needs however this comes with a price. You may end up becoming dependent on them allowing the programmer to raise pricing to an unrealistic level or if you try to switch programmers they may not be able to start where the first one finished because of the way that the code is written.

By utilizing pre-existing systems like Durpal, WordPress, osCommerce or one of many other web-based systems you can ensure that there are a number of developers that can help you when it comes to developing your business over time because of a commonly supported web-based platform that allows you to do business today and well into the future.

Analyze Your Website in Three Ways

January 21, 2008

When the term “website analysis” is tossed around it means different things to different people and because website analysis focuses on different areas, specifically

  1. Your Website - The door to your online business
  2. Your Customers - The people that will keep coming back for more
  3. Your Marketing Campaigns - The buzz you need to keep people coming back for more

And from these 3 areas of focus the outcome is the ROI on your website. Many people in the past couple of years thought, if I build it they will come, but the truth is that most people that thought that went out of business a long time ago. Now you may think, that’s a lot to look at but the truth is that if you ran a physical business you wouldn’t put your store in a mall where no one went hoping that people saw your store and went in to purchase, would you?

Google has been developing some tools to aid you when it comes to analyzing these things. Some of which you may know and some may be new to you.

I only mention that Google is the place to go for a complete solution because no other vendors in these industries have yet to offer a complete solution and because everyone knows Google when it comes to internet search. Without knowing your customers and their habits how are you supposed to sell to them? Increase profits? And be heard in your market? Just a little food for thoughts about your business

Luc

Smart Testing Your Website with Google Website Optimizer

January 17, 2008

I found this video produced and broadcasted by Google that discusses concepts of “Smart Testing” as Google calls it. Google’s Website Optimizer can be used in website development for A/B split testing and testing specific page elements. If you are running a web business then smart testing shows you the areas on your website that need improvement. This is the beginning of web intelligence because the more you understand about your specific web-based business the more that you can effect change on it. Enjoy the video and feel free to check out Google’s profile page on YouTube.

Next Page »