[gnomeweb-wml] Added Google Adwords tracking codes



commit b2e0b6a91543760c5114f098082dd729d2233a46
Author: Claus Schwarm <clschwarm googlemail com>
Date:   Fri Mar 5 15:25:09 2010 +0100

    Added Google Adwords tracking codes

 www.gnome.org/friends/Makefile.am   |    2 +-
 www.gnome.org/friends/htaccess      |    4 +-
 www.gnome.org/friends/index.wml     |   21 +++++++++++++
 www.gnome.org/friends/step2.wml     |   49 +++++++++++++++++++++++++++++--
 www.gnome.org/friends/thank-you.wml |   55 +++++++++++++++++++++++++++++++++++
 5 files changed, 125 insertions(+), 6 deletions(-)
---
diff --git a/www.gnome.org/friends/Makefile.am b/www.gnome.org/friends/Makefile.am
index 5fdae2e..a5f63a7 100644
--- a/www.gnome.org/friends/Makefile.am
+++ b/www.gnome.org/friends/Makefile.am
@@ -9,7 +9,7 @@ page_SCRIPTS = \
 	previous-donors.html \
 	step2.php \
 	promote.html \
-	thank-you.html \
+	thank-you.php \
 	.htaccess
 
 include $(top_srcdir)/rules.common
diff --git a/www.gnome.org/friends/htaccess b/www.gnome.org/friends/htaccess
index e02fe9e..aa6ae51 100644
--- a/www.gnome.org/friends/htaccess
+++ b/www.gnome.org/friends/htaccess
@@ -1,6 +1,6 @@
-<Files "step2.php">
+<FilesMatch "\.php$">
  allow from all
  SetOutputFilter PHP
  SetInputFilter PHP
  LimitRequestBody 524288
-</Files>
+</FilesMatch>
diff --git a/www.gnome.org/friends/index.wml b/www.gnome.org/friends/index.wml
index 1882bfa..ba9d763 100644
--- a/www.gnome.org/friends/index.wml
+++ b/www.gnome.org/friends/index.wml
@@ -124,5 +124,26 @@ SWIFT: CTZIUS33
 
 </div> <!-- end of div#friend-bread -->
 
+<!-- Google Code for Friends Page - Step 1 Conversion Page -->
+<script type="text/javascript">
+<!--
+var google_conversion_id = 1023408471;
+var google_conversion_language = "en";
+var google_conversion_format = "2";
+var google_conversion_color = "ffffff";
+var google_conversion_label = "3lhhCOnRxwEQ1_L_5wM";
+var google_conversion_value = 0;
+if (0) {
+  google_conversion_value = 0;
+}
+//-->
+</script>
+<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js";>
+</script>
+<noscript>
+<div style="display:inline;">
+<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1023408471/?value=0&amp;label=3lhhCOnRxwEQ1_L_5wM&amp;guid=ON&amp;script=0"/>
+</div>
+</noscript>
 </body>
 </html>
diff --git a/www.gnome.org/friends/step2.wml b/www.gnome.org/friends/step2.wml
index bacd716..ac930f5 100644
--- a/www.gnome.org/friends/step2.wml
+++ b/www.gnome.org/friends/step2.wml
@@ -1,4 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<?php
+	ob_start();
+
+    // Track selection for Google Adwords
+	if(!empty($_POST['aidtype'])) {
+        setcookie("aidtype", $_POST['aidtype'], time()+60*60);
+    }
+?>
 <html>
 <head>
 
@@ -38,8 +46,6 @@ improve GNOME products.</li>
 
 <form method="post" action="https://www.paypal.com/cgi-bin/webscr";>	
 <?php
-	ob_start();
-
 	if(!empty($_POST['aidtype'])) {
 		switch($_POST['aidtype']) {
 			case 'adopt':
@@ -185,6 +191,43 @@ improve GNOME products.</li>
 <p id="foundation-info">GNOME Foundation is a 501(c)3 non-profit organization, and your donation is considered charitable to the extent of applicable law. Consult your tax preparer to determine tax-deductibility.</p>
 
 </div>
-
+<?php
+	switch($_POST['aidtype']) {
+		case 'adopt':
+            $conversion_label = "FupuCMPSxwEQ1_L_5wM";
+			break;
+		case 'associate':
+            $conversion_label = "pqrMCJ3TxwEQ1_L_5wM";
+			break;
+		case 'sponsor':
+            $conversion_label = "LKLyCPfTxwEQ1_L_5wM";
+			break;
+		case 'philanthropist':
+            $conversion_label = "I4h4CNHUxwEQ1_L_5wM";
+			break;
+		default:
+			header('location: ./index.html');
+			die('No type selected.');
+			break;
+	}
+?>
+<!-- Google Code for Step 2 Conversion Page -->
+<script type="text/javascript">
+<!--
+var google_conversion_id = 1023408471;
+var google_conversion_language = "en";
+var google_conversion_format = "2";
+var google_conversion_color = "ffffff";
+var google_conversion_label = "<?php echo $conversion_label;?>";
+var google_conversion_value = 0;
+//-->
+</script>
+<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js";>
+</script>
+<noscript>
+<div style="display:inline;">
+<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1023408471/?label=<?php echo $conversion_label;?>&amp;guid=ON&amp;script=0"/>
+</div>
+</noscript>
 </body>
 </html>
diff --git a/www.gnome.org/friends/thank-you.wml b/www.gnome.org/friends/thank-you.wml
index 43b55f8..7f1017b 100644
--- a/www.gnome.org/friends/thank-you.wml
+++ b/www.gnome.org/friends/thank-you.wml
@@ -57,6 +57,61 @@ Executive Director</p>
 <textarea rows="2" cols="65"><a href="http://www.gnome.org/friends/";> <img src="http://www.gnome.org/friends/banners/support-gnome.png"; alt="Become a Friend of GNOME" border="0" /></a> <br/></textarea></p>
 </p>
 
+<?php
+	ob_start();
+
+	if(isset($_COOKIE['aidtype'])) {
+		switch($_COOKIE['aidtype']) {
+			case 'adopt':
+				$conversion_label = "iFaMCKvVxwEQ1_L_5wM";
+				$conversion_value = 120;
+	    			break;
+			case 'associate':
+				$conversion_label = "Dn0DCIXWxwEQ1_L_5wM";
+				$conversion_value = 25;
+				break;
+			case 'sponsor':
+				$conversion_label = "APL1CN_WxwEQ1_L_5wM";
+				$conversion_value = 500;
+				break;
+			case 'philanthropist':
+				$conversion_label = "BOGVCLnXxwEQ1_L_5wM";
+				$conversion_value = 1200;
+				break;
+			default:
+				// If cookie data is unexpected, use associate as default
+				$conversion_label = "Dn0DCIXWxwEQ1_L_5wM";
+				$conversion_value = 25;
+				break;
+		}
+	} else {
+        	// If no cookie data, use associate as default
+		$conversion_label = "Dn0DCIXWxwEQ1_L_5wM";
+        	$conversion_value = 25;
+	}
+?>
+
+<!-- Google Code for Thank You Conversion Page -->
+<script type="text/javascript">
+<!--
+var google_conversion_id = 1023408471;
+var google_conversion_language = "en";
+var google_conversion_format = "2";
+var google_conversion_color = "ffffff";
+var google_conversion_label = "<?php echo $conversion_label;?>";
+var google_conversion_value = 0;
+if (<?php echo $conversion_value;?>) {
+  google_conversion_value = <?php echo $conversion_value;?>;
+}
+//-->
+</script>
+<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js";>
+</script>
+<noscript>
+<div style="display:inline;">
+  <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1023408471/?value=<?php echo $conversion_value;?>&amp;label=<?php echo $conversion_label;?>&amp;guid=ON&amp;script=0"/>';
+</div>
+</noscript>
 
 </body>
 </html>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]