You can see it work throughout this wordpress blog, to the right you see DCE Article 94. Notice you can select the number as text. The number is pulled from the post on every single page by placing this line of code in your wordpress single.php template page.
<?php the_ID(); ?>
Note: When using this line of code be sure it is between these two lines of code in your single.php page
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php endwhile; else: ?>
I place the code in its own div with a background image to create the illusion of unity. I use margins to move the number to the right spot of the image. My CSS and Code looks like this.
<style>
#page_number_id_spawn { float:left; text-align:right; margin-top:240px; width:135px; color:#900; font-size:30px; font-family:Georgia, 'Times New Roman', Times, serif;}</style>
<div id="page_number_id_spawn"><?php the_ID(); ?></div>
My letter to Google:
I've recently been revamping my site, from studying the analytics i'm getting a high bounce rate because a great deal of my visitors spend 0.00 time on the site with 100% bounce and exit. These visitors are usually from outside the US. I run wordpress as my CMS, I know there is spam problem from people wanting to post comments with advertisements. I have blacklist set up to prevent this the posting, but they still are registering as hits. How can i prevent the spammers from effecting my Analytics data?
The solution:
Create a filter for excluding IP addresses from your data. You can create filters that block a large number of IP addresses that you receive spam data from. You have also mentioned that these visits are mostly from outside US. For this, you may consider creating filters to exclude data from a geographic region.
The filter to exclude all data from an IP address works to exclude clicks from certain sources. You can enter a single IP address, or a range of
addresses.
To create a custom Filter
1. Log in to Google Analytics.
2. Click 'Filter Manager.'
3. Click 'Add Filter.'
4. Enter a 'Filter Name.'
5. Under 'Filter Type' choose 'Custom Filter.'
6. Click 'Exclude' and within 'Filter Field' choose 'Visitor Geographical
Region.'
7. Enter the appropriate filter pattern.
8. Apply this filter to the appropriate 'Website Profiles.'
9. Click 'Finish.'
You can figure out what IPs to block by check your map overlay in Analytics. Display the full list of countries, pick out the countries with 00:00:00 time on your site, and block that countries IP range.
My offenders this month are: Turkey, Russia, Greece, Ireland (which makes justsherlock sad), Mexico, Switzerland, Portugal, Brazil, Singapore (not a country), New Zealand, Bulgaria, Vietnam, Spain, Czech Republic, and it goes on.
Since these aren't justherlock's myspace girlfriends we can block them. Lets start with my girlfriends in Turkey, then Russia.
Here is a link to all the IPs to ban: IP Ranges for TR [Turkey]
Below is an example of the code produced when using a range of IPs from that list and this Google tool: IP Ban Tool
^217\.195\.(1(9[2-9])|2(0[0-7]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$
For Russia the list gets larger: IP Ranges for RU [Russian Federation]
From writing this article and seeing the work, it doesn't seem worth its weight in labor, so you welcome to do it (post your results). I ended up just banning my own IP so I do not skew the numbers. What I'm considering doing is taking these IP country lists and Banning them through my .htaccess file. USSR you win.... for now!