Automated Adsense Privacy Policy Deployment Guide

Posted 1428 days ago - Development

Hopefully you took the time to actually read the new Adsense Terms and Conditions. The new terms require all Adsense publishers to display a privacy policy on any web-site displaying Adsense ads.

Here's an excerpt from this page:

We've also added some specific privacy policy requirements that make it necessary for publishers to post and abide by a transparent privacy policy for their users. According to this policy, publishers must notify their users of the use of cookies and/or web beacons to collect data in the ad serving process.

Thanks to Jen from Jensense, all my web-sites now have a privacy policy that complies with the new Google Adsense Terms and Conditions; however, if you're responsible for multiple sites, implementing this policy could potentially take hours. Well today's your lucky day because I took her basic policy and added some minor php tweeks to semi-automate the implementation process. This little bit of PHP wizardry drastically cut down on the amount of time I would have spent manually implementing the policy for each web-site.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo substr($_SERVER['SERVER_NAME'], 4); ?> Privacy Policy</title>
</head>
<body>
<table border="0" width="775" cellpadding="0" cellspacing="0" align="center">
<tr>
<td style="font-face: Verdana;">
<h1><?php echo substr($_SERVER['SERVER_NAME'], 4); ?> Privacy Policy</h1>
<p>The privacy of <?php echo substr($_SERVER['SERVER_NAME'], 4); ?> visitors is important to us. At
<?php echo substr($_SERVER['SERVER_NAME'], 4); ?>, we recognize that the privacy of our
visitor’s personal information is important. Here is
information on what types of personal information we receive and
collect when you visit <?php echo substr($_SERVER['SERVER_NAME'], 4); ?>, and how we safeguard your
information. We never sell your personal information to third
parties.</p>
<h2>Log Files</h2>

<p>We collect and use the data contained in log files. The
information in the log files include your IP (internet protocol)
address, your ISP (internet service provider, such as AOL or Shaw
Cable), the browser used to visit our site (such as Internet
Explorer or Firefox), the time you visited our site and which
pages you visited within our site.</p>
<h2>Cookies and Web Beacons</h2>
<p>We do use cookies to store information, such as your personal
preferences when you visit our site. This could include only
showing you a popup once in your visit, or the ability to login
to some of our features, such as forums.</p>
<h2>Third Party Advertisements</h2>
<p>We also use third party advertisements on <?php echo substr($_SERVER['SERVER_NAME'], 4); ?> to
support our site. Some of these advertisers may use technology
such as cookies and web beacons when they advertise on our site,
which will also send these advertisers (such as Google through
the Google AdSense program) information including your IP
address, your ISP , the browser you used to visit our site, and
in some cases, whether you have Flash installed. This is
generally used for geotargeting purposes (showing New York real
estate ads to someone in New York, for example) or showing
certain ads based on specific sites visited (such as showing
cooking ads to someone who frequents cooking sites).</p>
<p>You can choose to disable or selectively turn off our cookies
or third-party cookies in your browser settings, or by managing
preferences in programs such as Norton Internet Security;
however, this can affect how you are able to interact with our
site as well as other websites. This could include the inability
to login to services or programs, such as logging into forums or
accounts.</p>
<p>
We use third-party advertising companies to serve ads when you
visit our website. These companies may use information (not including
your name, address, email address, or telephone number) about
your visits to this and other websites in order to provide advertisements
about goods and services of interest to you.
</p>
<ul>
<li>Google, as a third party vendor, uses cookies to serve ads on your site.
<li>Google's use of the DART cookie enables it to serve ads to your users based on their visit to your sites and other sites on the Internet.
<li>Users may opt out of the use of the DART cookie by visiting the <a href="http://www.google.com/privacy_ads.html">Google ad and content network privacy policy</a>.
</ul>
<div style="text-align:center;"><h3><a href="/" title="Return To <?php echo substr($_SERVER['SERVER_NAME'], 4); ?> Home">Return To <?php echo substr($_SERVER['SERVER_NAME'], 4); ?> Main Index</a></h3></div>
</td>
</tr>
</table>
</body>
</html>

And there you have it. A customized, site specific privacy policy. From here, save the file as whatever.php, then drop a link to your new privacy policy. You could take this a step further and use PHP's include function to drop this right into your site's template.

This script assumes your site defaults to http://www.yourdomain.com, rather than http://yourdomain.com. If you've configured your site to not use www, you'll need to replace every occurrence of,

<?php echo substr($_SERVER['SERVER_NAME'], 4); ?>

With,

<?php echo $_SERVER['SERVER_NAME']; ?>

Failure to do so will result in displaying domainXYZ.com, instead of yourdomainXYZ.com. Questions? Comments? Give me a shout below. If you'd like to keep up with Nullamatix, consider subscribing (top of the sidebar) via email to have posts delivered directly to your inbox, or add our full RSS feed to your favorite RSS reader.

Word Count: 1061

Tags: , ,

Click Here to Submit a Comment

Permalink / Last Modified:

Support Nullamatix.com:

See Also:

  • 12/26/2009 -- WordPress Hacks Worth Implementing
    Excerpt: "Combat Comment Spam Most spammers aren't clever enough to populate the REFERER header. This code snippet is not only extremely easy to implement, but pretty effective, too. Open up your themes functions.php and drop in the following: function ..."
  • 11/28/2009 -- New Wordpress Plugin: IP Intelligence
    Excerpt: "Description IP Intelligence the ability to retrieve information about a commentators IP address without leaving the "edit-comments.php" page. Version 0.0.1 is capable of retrieving the following information: Reverse DNS/PTR Long/Proper IPv4 ..."
  • 01/22/2008 -- 301 Redirect Codes For PHP, ASP, Coldfusion, and More
    Excerpt: "301 is an HTTP status code that basically instructs search engines and browsers that a page has moved, permanently. If you've changed a file name, domain, folder path, whatever, a 301 redirect will update the search engines. This ensures your content remains ..."
  • 12/12/2007 -- Nullamatix.com Survived The Digg Effect, Barely
    Excerpt: "Wow, what an interesting day. After experiencing The Digg Effect first hand, and looking over a few stats, I've made the conclusion that Digg users are comparable to a swarm of crack heads surfing the Internet. Don't get me wrong, landing on the front page of ..."

0 Comments

[ RSS feed | Trackback URI | Leave a Comment ]

Leave a Comment

Comments are moderated prior to showing up. If your comment does not show up immediately, please do not attempt to resubmit. If you're redirected to the original post after pressing "Add Comment", your comment was successfully entered into the moderation queue.

Trackback Responses to This Post:

  • No Trackbacks, yet. Help Nullamatix.com by Linking to This Post.