|
|||||||
| Newbie Questions New to the whole making money online and developing your own sites thing? Post your questions here so that seasoned members can answer your questions. Please keep your questions out of the other categories. We know you're a newbie, but there's no reason to be annoying. |
|
Welcome to the WickedFire - Affiliate Marketing Forum - Internet Marketing Webmaster SEO Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Senior Member
|
I was having a little problem with getting tracking setup. After fumbling thru some java, and the tracking202 forum, I thought I would post the success portion. Credit does go over to tracking202 though.
If you go thru tracking202 or prosper202, you are give some php code that allows tracking of whose clicking thru from your LP to the actual product page. An example would be. Code:
<?php
// -------------------------------------------------------------------
//
// Tracking202 PHP Redirection, created on Thu Jul, 2009
//
// This PHP code is to be used for the following landing page.
// http://cashfromthekeyboard.com/google
//
// -------------------------------------------------------------------
if (isset($_COOKIE['tracking202outbound'])) {
$tracking202outbound = $_COOKIE['tracking202outbound'];
} else {
$tracking202outbound = 'http://yourstuffhere';
}
header('location: '.$tracking202outbound);
?>
Google provides the following code, which is supposed to go just prior to the </body> tag. Code:
<script type="text/javascript">
if(typeof(_gat)!='object')document.write('<sc'+'ript src="http'+
(document.location.protocol=='https:'?'s://ssl':'://www')+
'.google-analytics.com/ga.js"></sc'+'ript>')</script>
<script type="text/javascript">
try {
var pageTracker=_gat._getTracker("UA-*******-1");
pageTracker._trackPageview("/**********/goal");
}catch(err){}</script>
I started looking around, and came across the T202 solution, which didn't work right away either. I could get google to validate, but the page would not load. Or, I could load the page, and google would throw an error. After several iteration, this was the final working solution. As main.php this did not work. as main.html, it did. Final page code Code:
<script type="text/javascript">
if(typeof(_gat)!='object')document.write('<sc'+'ript src="http'+
(document.location.protocol=='https:'?'s://ssl':'://www')+
'.google-analytics.com/ga.js"></sc'+'ript>')</script>
<script type="text/javascript">
try {
var pageTracker=_gat._getTracker("UA-*******-1");
pageTracker._trackPageview("/*********/goal");
}catch(err){}</script>
<!-- This is the thankyou/redirect.html page-->
<!-- PLACE GOOGLE THANK YOU PIXEL CODE HERE -->
<!-- NOW THE TRACKING202 REDIRECTS OUT -->
<script type="text/javascript">
window.location='http://Your site here with t202 info' + ReadCookie('tracking202pci');
function ReadCookie(n) {
var cookiecontent = new String();
if(document.cookie.length > 0) {
var cookiename = n+ '=';
var cookiebegin = document.cookie.indexOf(cookiename);
var cookieend = 0;
if(cookiebegin > -1) {
cookiebegin += cookiename.length;
cookieend = document.cookie.indexOf(";",cookiebegin);
if(cookieend < cookiebegin) { cookieend = document.cookie.length; }
cookiecontent = document.cookie.substring(cookiebegin,cookieend);
}
}
return unescape(cookiecontent);
} // function ReadCookie()
</script>
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Letest Matrimonial Website for sale | tech biz | Sell, Buy & Trade | 4 | 06-29-2009 06:42 PM |
| Cheap Matrimonial Website | tech biz | Sell, Buy & Trade | 7 | 06-29-2009 01:05 PM |
| MATRIMONIAL WEBSITE COMPANY | tech biz | Design, Development & Programming | 2 | 06-14-2009 10:47 PM |
| [DomainOn.net] FREE 24/7 Website Monitoring, Web Server Monitoring Services / SMS Ale | weblord | Sell, Buy & Trade | 0 | 02-07-2008 10:35 PM |
| Massive Domain Blowout: HIVAIDS.US, CZECHREPUBLIC.CC, PRESENTCREDIT.COM and more! | DomainRealty | Sell, Buy & Trade | 6 | 09-10-2007 06:18 PM |