Jump to content
osCoders

Google Analytics module

Recommended Posts

Hi.

 

I installed this no doubt great contribution (the latest version) as instructed, adding the code to every php file in the main directory, but it doesn't work. I have no extra google-related lines in the source of the checkout_success and no transactions are shown in google analytics.

 

If anyone could help, I'd be most greateful.

Share this post


Link to post
Share on other sites
Hi.

 

I installed this no doubt great contribution (the latest version) as instructed, adding the code to every php file in the main directory, but it doesn't work. I have no extra google-related lines in the source of the checkout_success and no transactions are shown in google analytics.

 

If anyone could help, I'd be most greateful.

 

could you post your site's URL?

Share this post


Link to post
Share on other sites

Not sure if anyone has mentioned this before but I couldn't find any references to it. It looks like Google has a problem processing numbers passed into their analytics system with comma's as thousand separators:

 

From google:

 

Thank you for your email. Your intuition was correct, and the reason for the reporting error is the comma. Our Analytics system cannot read commas. At this time the problem will be easiest resolved if you take steps to eliminate the thousand separator from the figures.

 

So... changing occurences of this..

 

number_format($totals['value'], 2)

 

to this

 

number_format($totals['value'], 2, '.', '')

 

in the analytics.php script will probably fix the problem. (Stop me if I'm wrong :blush: )

 

Again, sorry if this is already posted (I figured someone must've had this problem already) but I couldn't find anything.

Share this post


Link to post
Share on other sites

Thanks for the contribution. Its very helpful.

 

Is anyone here using it with the regular Authorize.net payment module that comes with osCommerce? I have two payment methods, paypal and authorize.net. The escommerce tracking works for paypal but not authnet.

 

Does anyone have ecommerce tracking working with Authroize.net SIM method? Or is anyone else having the same problem?

Share this post


Link to post
Share on other sites
I have no extra google-related lines in the source of the checkout_success and no transactions are shown in google analytics.

 

could you post the code of your checkout_success.php?

Also be sure that e-commerce tracking is activated in Google

Share this post


Link to post
Share on other sites

Hi,

 

I tried to implement this contrib for a client (thedac.co.uk) and it isn't showing any transactions. There were no modifications to checkout_success.php so i uploaded the pre-made one and the analytics module also.

 

No luck.

 

Is there anything I am missing?

 

Thanks

Share this post


Link to post
Share on other sites
could you post the code of your checkout_success.php?

Also be sure that e-commerce tracking is activated in Google

 

It is activated.

 

Code:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="LTR" lang="pl">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"><META NAME="Authors" CONTENT="www.oscommerce.pl , http://maq.w-s.pl">

<title>Anza - sklep</title>

<base href="http://www.anzasklep.pl/">'>http://www.anzasklep.pl/">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

 

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

</script>

<script type="text/javascript">

_uacct="UA-496892-1";

urchinTracker();

</script>

 

 

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onLoad="java script:__utmSetTrans()">

<!-- header //-->

<body class=Bbody topmargin="0" leftmargin="0">

 

 

 

 

 

 

 

 

<center>

<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">

<tr>

<td rowspan="2">?</td>

<td width="776" valign="top" background="/anza_img/bcc.gif" >

<table border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="100%">

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="230"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

WIDTH="230" HEIGHT="57" id="logo" ALIGN="">

<param value="butm01=http://www.anzasklep.pl/" name="FlashVars" id="FlashVars">

<PARAM NAME=movie VALUE="/anza_img/logo.swf"> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="/anza_img/logo.swf" menu=false quality=high bgcolor=#FFFFFF WIDTH="230" HEIGHT="57" NAME="logo" ALIGN=""

TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>

</OBJECT></td>

<td background="/anza_img/001bc.gif">?</td>

<td width="189"><img border="0" src="/anza_img/krahlogo.gif" width="189" height="57"></td>

</tr>

</table>

</td>

</tr>

<tr>

<td width="100%">

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="168"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

WIDTH="168" HEIGHT="156" id="krople" ALIGN="">

<PARAM NAME=movie VALUE="/anza_img/krople.swf"> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="/anza_img/krople.swf" menu=false quality=high bgcolor=#FFFFFF WIDTH="168" HEIGHT="156" NAME="krople" ALIGN=""

TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>

</OBJECT></td>

<td valign="top">

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="100%"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

WIDTH="609" HEIGHT="110" id="flash" ALIGN="">

<PARAM NAME=movie VALUE="/anza_img/flash.swf"> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="/anza_img/flash.swf" menu=false quality=high bgcolor=#FFFFFF WIDTH="609" HEIGHT="110" NAME="flash" ALIGN=""

TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>

</OBJECT></td>

</tr>

<tr>

<td width="100%">

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="422">

<table border="0" cellpadding="0" cellspacing="0">

<tr><Td><img border="0" src="/anza_img/podflash1_a.jpg" width="422" height="29"></td></tr>

<tr><td class="headerNavigation1" align="center">

<a href="http://www.anzasklep.pl/logoff.php" class="headerNavigation1">Wyloguj się</a> ?|? <a href="http://www.anzasklep.pl/account.php" class="headerNavigation1">Moje Konto</a> ?|? <a href="http://www.anzasklep.pl/shopping_cart.php" class="headerNavigation1">Zawarto?ć koszyka</a> ?|? <a href="http://www.anzasklep.pl/checkout_shipping.php" class="headerNavigation1">Zam?wienie</a> ??

</td></tr>

</table>

 

<td background="/anza_img/podflashbc.gif">

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="100%"><a class=right01>?</a></td>

</tr>

<tr>

<td width="100%" align="center">

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="121" align="center">??<form name="quick_find" method="get" action="http://www.anzasklep.pl/advanced_search_result.php"><input'>http://www.anzasklep.pl/advanced_search_result.php"><input type="text" name="keywords" size="15" maxlength="30" value=""></td>

<td width="55"><a href="http://"><input type="image" src="/anza_img/znajdz.gif"></form></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

<td width="11"><img border="0" src="/anza_img/podflash02.gif" width="11" height="46"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

 

<tr>

<td width="355" valign="top">

</td>

</tr>

</table>

</td>

<td rowspan="2">?</td>

</tr>

<tr><td width="776" valign="top" height="26">

 

 

 

<table border="0" width="777" cellspacing="0" cellpadding="0">

<tr class="headerNavigation">

<td class="headerNavigation">??<a href="http://www.anzasklep.pl" class="headerNavigation">Anza</a> ? <a href="http://www.anzasklep.pl/" class="headerNavigation">Sklep</a> ? Zam?wienie ? Przyjęto!</td>

<td align="right" class="headerNavigation"></td>

</tr>

</table>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="140" valign="top"><table border="0" width="140" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<!-- categories //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="22" height="31"></td>

<td width="100%" height="14" class="infoBoxHeading">Sklep internetowy</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td class="boxText"><table border="0" cellpaddin="0" cellspacing="0" width="100%" height="100%" background="/anza_img/roz.jpg"></td>

</tr>

<tr>

<td class="boxText"><Tr><td><table cellspadding="1" cellspacing="1"><tr><td width="25" align="right"><a class="headerNavigation1" href="http://www.anzasklep.pl/sklep-karcher/"><img src="images/cat_on.gif" border="0" alt="" width="8" height="10"></a> </td><td><a class="headerNavigation1" href="http://www.anzasklep.pl/sklep-karcher/"><font color="white">Sklep K?RCHER</font></a>?<a class="boxText"><font color="white">(346)</font></a></td></tr></td></tr></table><Tr><td><table cellspadding="1" cellspacing="1"><tr><td width="25" align="right"><a class="headerNavigation1" href="http://www.anzasklep.pl/sklep-maszyny-i-urzadzenia/"><img src="images/cat_on.gif" border="0" alt="" width="8" height="10"></a> </td><td><a class="headerNavigation1" href="http://www.anzasklep.pl/sklep-maszyny-i-urzadzenia/"><font color="white">Sklep MASZYNY I URZˇDZENIA</font></a>?<a class="boxText"><font color="white">(65)</font></a></td></tr></td></tr></table></td>

</tr>

<tr>

<td class="boxText"></table></CENTER></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

 

</td>

</tr>

<!-- categories_eof //-->

 

<!-- categories //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="100%" height="14" class="infoBoxHeading">Kategorie</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td align="center" class="boxText"><form action="http://www.anzasklep.pl/" method="get"><select name="cPath" onChange="this.form.submit();" size="1" style="width:100%"140"><option value="" SELECTED>-- Wybierz --</option><option value="1">Sklep K?RCHER</option><option value="7">??DLA DOMU</option><option value="9">????Czyszczenie i prasowanie par?</option><option value="12">????Myjki</option><option value="8">????Odkurzacze</option><option value="23">????Zamiatarki</option><option value="2">??PROFESJONALNE</option><option value="5">????Odkurzacze pior?ce / parownice</option><option value="3">????Odkurzacze profesjonalne</option><option value="6">????Szorowarki</option><option value="10">????Urz?dzenia wysokoci?nieniowe</option><option value="13">??????Bez podgrzewania wody</option><option value="11">??????Z podgrzewaniem wody</option><option value="14">????Zamiatarki profesjonalne</option><option value="22">??AKCESORIA</option><option value="18">???RODKI CZYSTO?CI</option><option value="20">????Apex Clean</option><option value="19">????Atas</option><option value="21">????RM Karcher</option><option value="4">??NISKIE CI?NIENIE</option><option value="47">??MOPY I W?ZKI</option><option value="15">Sklep MASZYNY I URZˇDZENIA</option><option value="16">??AGREGATY PRˇDOTW?RCZE</option><option value="17">????Agregaty przeno?ne</option><option value="41">????Agregaty traktorowe</option><option value="37">??BUDOWLANO-DROGOWE</option><option value="38">????Młoty</option><option value="30">??MOTOPOMPY</option><option value="31">??OGRZEWANIE i OSUSZANIE</option><option value="32">????Nagrzewnice</option><option value="35">??????Nagrzewnice elektryczne</option><option value="36">??????Nagrzewnice gazowe</option><option value="33">??????Nagrzewnice olejowe</option><option value="34">????????Bez odprowadzania spalin</option><option value="118">????????Z odprowadzaniem spalin</option><option value="121">????Oczyszczacze</option><option value="119">????Osuszacze</option><option value="120">????Klimatyzatory</option><option value="28">??SILNIKI</option><option value="29">????Silniki benzynowe</option><option value="45">????Silniki diesel</option><option value="39">????Silniki zaburtowe</option><option value="46">??SPRĘŻARKI</option><option value="24">??URZˇDZENIA DO OGRODU</option><option value="43">????Glebogryzarki</option><option value="26">????Kosiarki</option><option value="44">??????Kosiarki elektryczne</option><option value="27">??????Kosiarki spalinowe</option><option value="42">????Kosy spalinowe</option><option value="40">????Od?nieżarki</option><option value="25">????Traktorki</option><option value="117">??WYPOSAŻENIE</option></select></form></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- categories_eof //-->

 

<!-- manufacturers //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="100%" height="14" class="infoBoxHeading">Producenci</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td class="boxText"><form name="manufacturers" action="http://www.anzasklep.pl/" method="get"><select name="manufacturers_id" onChange="location=document.manufacturers.manufacturers_id.options[document.manufacturers.manufacturers_id.selectedIndex].value;" size="1" style="width: 100%"><option value="" SELECTED>-- Wybierz --</option><option value="/apex/">Apex</option><option value="/atas/">Atas</option><option value="/atlas-copco/">Atlas Copco</option><option value="/belle/">Belle</option><option value="/honda/">Honda</option><option value="/karcher/">Karcher</option><option value="/master/">Master</option><option value="/nito/">Nito</option><option value="/tecno-trolley-system/">Tecno Trolley System</option><option value="/tyrolit/">Tyrolit</option></select></form></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- manufacturers_eof //-->

<!-- whats_new //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="22" height="31"></td>

<td width="100%" height="14" class="infoBoxHeading">Nowo?ci</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td align="center" class="boxText"><a href="http://www.anzasklep.pl/oczyszczacz-powietrza-desa-ap20m/"><img src="images/zdjecia_sklep/ap20m.jpg" border="0" alt="Oczyszczacz powietrza Desa AP20M" title=" Oczyszczacz powietrza Desa AP20M " width="100" height="128"></a><br><a href="http://www.anzasklep.pl/oczyszczacz-powietrza-desa-ap20m/">Oczyszczacz powietrza Desa AP20M</a><br>178,29zł</td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- whats_new_eof //-->

<!-- search //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="22" height="31"></td>

<td width="100%" height="14" class="infoBoxHeading">Wyszukiwanie</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td align="center" class="boxText"><form name="quick_find" action="http://www.anzasklep.pl/advanced_search_result.php" method="get"><input type="text" name="keywords" size="10" maxlength="30" style="width: 110px">?<input type="image" src="includes/languages/polish/images/buttons/button_quick_find.gif" border="0" alt="Wyszukiwanie" title=" Wyszukiwanie "><br>Wpisz słowo aby wyszukać produkt.<br><a href="http://www.anzasklep.pl/advanced_search.php"><b>Wyszukiwanie Zaawansowane</b></a></form></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- search_eof //-->

<!-- information //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="22" height="31"></td>

<td width="100%" height="14" class="infoBoxHeading">Informacje</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td class="boxText"><a href="http://www.anzasklep.pl/regulamin.php">Regulamin Sklepu</a><br><a href="http://www.anzasklep.pl/privacy.php">Bezpieczeństwo</a><br><a href="http://www.anzasklep.pl/conditions.php">Korzystanie z?Serwisu</a><br></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- information_eof //-->

<tr><td align="center">

<br> <a title= "ISSA" href="http://issa.com" target="_blank"><img src="http://www.ekarcher.pl/anza_img/issa.jpg" border="0"></a>

</td></tr>

<tr><td align="center">

<br> <a title= "PSC" href="http://www.czystosc-psc.org.pl/" target="_blank"><img src="http://www.ekarcher.pl/anza_img/psc.jpg" border="0"></a>

</td></tr><!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><form name="order" action="http://www.anzasklep.pl/checkout_success.php/action/update" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="4" cellpadding="2">

<tr>

<td valign="top"><img src="images/table_background_man_on_board.gif" border="0" alt="Twoje Zam?wienie Zostało Przyjęte!" title=" Twoje Zam?wienie Zostało Przyjęte! " width="175" height="198"></td>

<td valign="top" class="main"><img src="images/pixel_trans.gif" border="0" alt="" width="1" height="10"><div align="center" class="pageHeading">Twoje Zam?wienie Zostało Przyjęte!</div><br>Twoje zam?wienie zostało przyjęte. Produkty kt?re zam?wiłe? zostan? wysłane w ci?gu 1-7 dni. W przypadku, gdyby towar był niedostępny, zostaniesz poinformowany o terminie dostawy e-mailem.<br><br>

Informuj mnie o aktualizacjach produkt?w kt?re wybrałem poniżej:<br><p class="productsNotifications"><input type="checkbox" name="notify[]" value="1717"> Pompa wodna WB 30<br></p> <h3>Dziękujemy za zakupy w naszym sklepie!</h3></td>

</tr>

</table></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>

</tr>

<tr>

<td align="right" class="main"><input type="image" src="includes/languages/polish/images/buttons/button_continue.gif" border="0" alt="Kontynuuj" title=" Kontynuuj "></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="50%" align="right"><img src="images/pixel_silver.gif" border="0" alt="" width="1" height="5"></td>

<td width="50%"><img src="images/pixel_silver.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table></td>

<td width="25%"><img src="images/pixel_silver.gif" border="0" alt="" width="100%" height="1"></td>

<td width="25%"><img src="images/pixel_silver.gif" border="0" alt="" width="100%" height="1"></td>

<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="50%"><img src="images/pixel_silver.gif" border="0" alt="" width="100%" height="1"></td>

<td width="50%"><img src="images/checkout_bullet.gif" border="0" alt="" width="11" height="11"></td>

</tr>

</table></td>

</tr>

<tr>

<td align="center" width="25%" class="checkoutBarFrom">Informacje o Dostawie</td>

<td align="center" width="25%" class="checkoutBarFrom">Informacje o Płatno?ci</td>

<td align="center" width="25%" class="checkoutBarFrom">Potwierdzenie</td>

<td align="center" width="25%" class="checkoutBarCurrent">Koniec!</td>

</tr>

</table></td>

</tr>

</table></form></td>

<!-- body_text_eof //-->

<td width="140" valign="top"><table border="0" width="140" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<!-- shopping_cart //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="22" height="31"></td>

<td width="100%" height="14" class="infoBoxHeading">Koszyk</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td class="boxText">...jest pusty</td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- shopping_cart_eof //-->

 

<!-- my_account_info //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="22" height="31"></td>

<td width="100%" height="14" class="infoBoxHeading">Info o koncie</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td align="left" class="boxText"> ? <a href="http://www.anzasklep.pl/account.php">Moje konto</a><br> ? <a href="http://www.anzasklep.pl/account_edit.php">Edycja konta</a><br> ? <a href="http://www.anzasklep.pl/address_book.php">Ksi?żka adresowa</a><br> ? <a href="http://www.anzasklep.pl/account_history.php">Historia zam?wień</a><br> ? <a href="http://www.anzasklep.pl/account_notifications.php">Powiadomienia</a><br><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="4"><br><a href="http://www.anzasklep.pl/logoff.php">Wyloguj się</a></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- my_account_info_eof //-->

 

<!-- customer_orders //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="22" height="31"></td>

<td width="100%" height="14" class="infoBoxHeading">Zam?wienia</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td class="boxText"><table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr> <td class="infoBoxContents"><a href="http://www.anzasklep.pl/pompa-wodna-wb-30/">Pompa wodna WB 30</a></td> <td class="infoBoxContents" align="right" valign="top"><a href="http://www.anzasklep.pl/checkout_success.php/action/cust_order/pid/1717"><img src="images/icons/cart.gif" border="0" alt="Do Koszyka" title=" Do Koszyka " width="17" height="17"></a></td> </tr></table></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- customer_orders_eof //-->

<!-- best_sellers //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="22" height="31"></td>

<td width="100%" height="14" class="infoBoxHeading">Bestsellery</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td class="boxText"><table border="0" width="100%" cellspacing="0" cellpadding="1"><tr><td class="infoBoxContents" valign="top">01.</td><td class="infoBoxContents"><a href="http://www.anzasklep.pl/odkurzacz-pioracy-puzzi-100-s/">Odkurzacz pior?cy Puzzi 100 S</a></td></tr><tr><td class="infoBoxContents" valign="top">02.</td><td class="infoBoxContents"><a href="http://www.anzasklep.pl/hd-512-c-plus/">HD 5/12 C Plus</a></td></tr><tr><td class="infoBoxContents" valign="top">03.</td><td class="infoBoxContents"><a href="http://www.anzasklep.pl/pompa-wodna-wb-30/">Pompa wodna WB 30</a></td></tr><tr><td class="infoBoxContents" valign="top">04.</td><td class="infoBoxContents"><a href="http://www.anzasklep.pl/hd-613-c-plus/">HD 6/13 C Plus</a></td></tr><tr><td class="infoBoxContents" valign="top">05.</td><td class="infoBoxContents"><a href="http://www.anzasklep.pl/k-298-m-plus/">K 2.98 M Plus</a></td></tr><tr><td class="infoBoxContents" valign="top">06.</td><td class="infoBoxContents"><a href="http://www.anzasklep.pl/karcher-rm-760-10kg/">K?RCHER RM 760 10kg</a></td></tr><tr><td class="infoBoxContents" valign="top">07.</td><td class="infoBoxContents"><a href="http://www.anzasklep.pl/parownica-sc-1122/">Parownica SC 1122</a></td></tr></table></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- best_sellers_eof //-->

<!-- specials //-->

<tr>

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="22" height="31"></td>

<td width="100%" height="14" class="infoBoxHeading">Promocje</td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents">

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

<tr>

<td align="center" class="boxText"><a href="http://www.anzasklep.pl/hd-613-c-plus/"><img src="images/zdjecia_sklep/1514201.jpg" border="0" alt="HD 6/13 C Plus" title=" HD 6/13 C Plus " width="100" height="100"></a><br><a href="http://www.anzasklep.pl/hd-613-c-plus/">HD 6/13 C Plus</a><br><s>2684,00zł</s><br><span class="productSpecialPrice">2300,00zł</span></td>

</tr>

<tr>

<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

<!-- specials_eof //-->

 

 

<tr><td align="center">

<br> <img src="http://www.ekarcher.pl/platnosci.gif" width="139" height="139">

</td></tr><!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

 

 

 

</td></tr>

</table>

</td></tr>

</table>

<table><tr>

<td width="776" valign="top" height="26">

<table border="0" width="100%" cellspacing="0" cellpadding="0">

Share this post


Link to post
Share on other sites

This is not not your checkout_success.php code: this is the HTML code rendered by the checkout_success.php.

What I want to see is the content of the file that is on your server, not the source you see in your browser

Share this post


Link to post
Share on other sites
This is not not your checkout_success.php code: this is the HTML code rendered by the checkout_success.php.

What I want to see is the content of the file that is on your server, not the source you see in your browser

 

Sorry, I don't know what gave the idea to post the source from the web. :)

 

<?php
/*
 $Id: checkout_success.php,v 1.49 2003/06/09 23:03:53 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// if the customer is not logged on, redirect them to the shopping cart page
 if (!tep_session_is_registered('customer_id')) {
tep_redirect(tep_href_link(FILENAME_DEFAULT));
 }

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {
$notify_string = 'action=notify&';
$notify = $HTTP_POST_VARS['notify'];
if (!is_array($notify)) $notify = array($notify);
for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
  $notify_string .= 'notify[]=' . $notify[$i] . '&';
}
if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);

//	tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
// Added a check for a Guest checkout and cleared the session - 030411 
if (tep_session_is_registered('noaccount')) { 
tep_session_destroy(); 
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL')); 
} 
else { 
tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string, 'SSL')); 
}
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SUCCESS);


 $breadcrumb->add(NAvb script:__utmSetTrans()">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="4" cellpadding="2">
	  <tr>
		<td valign="top"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE); ?></td>
		<td valign="top" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?><div align="center" class="pageHeading"><?php echo HEADING_TITLE; ?></div><br><?php echo TEXT_SUCCESS; ?><br><br>
<?php
 if ($global['global_product_notifications'] != '1') {
echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';

$products_displayed = array();
for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
  if (!in_array($products_array[$i]['id'], $products_displayed)) {
	echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
	$products_displayed[] = $products_array[$i]['id'];
  }
}

echo '</p>';
 } else {
echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
 }
?>
		<h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites

No wonder it's not working: the code to track conversions is not installed :-)

 

you must have, just before your </body> tag

 

<?php 
// osCoders.biz - Analystics - start 
	include(DIR_WS_MODULES . 'analytics/analytics.php'); 
// osCoders.biz - Analistics - end
?>
</body>

Share this post


Link to post
Share on other sites
No wonder it's not working: the code to track conversions is not installed :-)

 

you must have, just before your </body> tag

 

<?php 
// osCoders.biz - Analystics - start 
	include(DIR_WS_MODULES . 'analytics/analytics.php'); 
// osCoders.biz - Analistics - end
?>
</body>

 

Shame on me :blush: I was 100 percent I included everything, thanks for help, I'll see if it works now.

Share this post


Link to post
Share on other sites

I thought i figured it out. The oscommerce i am using has checkout-success.php (dash not underscore).

 

So i edited that page and here is the code:

 

<?php
/*
 $Id: checkout_success.php,v 1.49 2003/06/09 23:03:53 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// if the customer is not logged on, redirect them to the shopping cart page
 if (!tep_session_is_registered('customer_id')) {
tep_redirect(tep_href_link('index.php'));
 }

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {
$notify_string = 'action=notify&';
$notify = $HTTP_POST_VARS['notify'];
if (!is_array($notify)) $notify = array($notify);
for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
  $notify_string .= 'notify[]=' . $notify[$i] . '&';
}
if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);

//	tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
// Added a check for a Guest checkout and cleared the session - 030411 
if (tep_session_is_registered('noaccount')) { 
tep_session_destroy(); 
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL')); 
} 
else { 
tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string, 'SSL')); 
}
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SUCCESS);

 $breadcrumb->add(NAvb script:__utmSetTrans()">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" style="background: url(images/line-repeat-left.gif) top left repeat-y; padding-left:28px; padding-right: 5px" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
 <tr>
<td style="background: url(../images/rightbox/top-left-corner.gif) top left no-repeat; width: 9px; height: 9px"><?php echo tep_draw_separator('pixel-trans.gif', '9', '0'); ?></td>
<td style="background: url(../images/rightbox/line-top.gif) top left repeat-x; height: 9px"></td>
<td style="background: url(../images/rightbox/top-right-corner.gif) top right no-repeat; width: 9px; height: 9px"><?php echo tep_draw_separator('pixel-trans.gif', '9', '0'); ?></td>
 </tr>
 <tr>
<td style="background: url(../images/rightbox/line-left.gif) top left repeat-y; width: 9px"></td>
<td><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<td style="background: url(../images/rightbox/line-right.gif) top right repeat-y; width: 9px"></td>
 </tr>
 <tr>
<td style="background: url(../images/rightbox/bottom-left-corner.gif) bottom left no-repeat; width: 9px; height: 9px"></td>
<td style="background: url(../images/rightbox/line-bottom.gif) top left repeat-x; height: 9px"></td>
<td style="background: url(../images/rightbox/bottom-right-corner.gif) bottom right no-repeat; width: 9px; height: 9px"></td>
 </tr>
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="4" cellpadding="2">
	  <tr>
		<td valign="top" class="main"><?php echo tep_draw_separator('pixel-trans.gif', '1', '10'); ?><div align="center" class="pageheading"><?php echo HEADING_TITLE; ?></div><br><?php echo TEXT_SUCCESS; ?><br><br>
<?php
 if ($guest_account == false) { // not a guest Account
if ($global['global_product_notifications'] != '1') {
  echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';

  $products_displayed = array();
  for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
	if (!in_array($products_array[$i]['id'], $products_displayed)) {
	  echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
	  $products_displayed[] = $products_array[$i]['id'];
	}
  }

  echo '</p>';
} else {
  echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
}
 } else { // guest accounts action
echo TEXT_GUEST_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
 } // guest account end
?>
		<h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td>
	  </tr>
	</table></td>
  </tr>
<?php require('includes/add_checkout_success.php'); //ICW CREDIT CLASS/GV SYSTEM ?>
  <tr>
	<td><?php echo tep_draw_separator('pixel-trans.gif', '100%', '10'); ?></td>
  </tr>
		<tr>
	<td>
				<!--########## TRACKERS ##########-->
				<?php
					$subtotal = number_format(($orders_total['value'] * 1), 2, '.', '');
					$orderid = $orders_total['orders_id'];
					$ordersql = "SELECT * FROM orders WHERE orders_id='{$orderid}' LIMIT 1;";
					$orderresult = mysql_query($ordersql) or die(mysql_error());
					$orderdata = mysql_fetch_assoc($orderresult);
					$deliverypostcode = $orderdata['delivery_postcode'];
					$postalareacode = strtoupper(substr($deliverypostcode, 0, 2));
					switch ($postalareacode) {
						case 'AB':
						case 'BT':
						case 'DD':
						case 'IV':
						case 'KW':
						case 'PA':
						case 'PH':
							$surcharge = 45;
							break;
						case 'DG':
						case 'EH':
						case 'EX':
						case 'FK':
						case 'G':
						case 'KA':
						case 'KY':
						case 'LD':
						case 'LL':
						case 'ML':
						case 'PL':
						case 'PO':
						case 'SA':
						case 'SY':
						case 'TD':
						case 'TQ':
						case 'TR':
							$surcharge = 25;
							break;
						case 'BA':
						case 'BH':
						case 'BS':
						case 'CF':
						case 'DT':
						case 'HR':
						case 'NP':
						case 'SP':
						case 'TA':
							$surcharge = 15;
							break;
						default:
							if (substr($postalareacode, 0, 1) == 'G') {
								$surcharge = 25;
							} else {
								$surcharge = 0;
							}
							break;
					}
					$largeitemcount = 0;
					$mediumitemcount = 0;
					$smallitemcount = 0;
					$orderproductssql = "SELECT * FROM orders_products WHERE orders_id='".$orderdata['orders_id']."';";
					$orderproductsresults = mysql_query($orderproductssql) or die(mysql_error());
					while ($orderproductsdata = mysql_fetch_assoc($orderproductsresults)) {
						$wsql = "SELECT products_weight FROM products WHERE products_id='".$orderproductsdata['products_id']."';";
						$wresult = mysql_query($wsql) or die(mysql_error());
						$wrow = mysql_fetch_assoc($wresult);
						$productsweight = $wrow['products_weight'];
						if (($productsweight * 1) == 0) {
							$largeitemcount += (1 * $orderproductsdata['products_quantity']);
						} elseif (($productsweight * 1) == 2) {
							$mediumitemcount += (1 * $orderproductsdata['products_quantity']);
						} elseif (($productsweight * 1) == 1) {
							$smallitemcount += (1 * $orderproductsdata['products_quantity']);
						}
					}
					$deliverycost = 10;
					if ($smallitemcount > 4) { $deliverycost = 15; }
					if ($mediumitemcount > 0) { $deliverycost = 15; }
					if ($smallitemcount > (4 * 2)) { $deliverycost = 19.99; }
					if ($mediumitemcount > 2) { $deliverycost = 19.99; }
					if ($largeitemcount > 0) { $deliverycost = 19.99; }
					$deliverycost += $surcharge;
					if ($orderdata['delivery_country'] == 'United Kingdom') {
						$delivery = $deliverycost;
					} else {
						$delivery = 0;
					}
					$subtotal = ($subtotal * 1) + $delivery;
				?>
				<!--Sale Track Tracker-->
				<script language="javascript"> 
				<!-- 
					 var parm,data,rf,sr,htprot; htprot='http'; 
					 data = 'cid=251360'+ '&cs=<?php echo $subtotal; ?>' + '&it=<?php echo $quantity; ?>'+ '&oi=<?php echo $orderid; ?>'; 
					 parm='border=0 hspace=0 vspace=0 width=1 height=1'; 
					 if(self.location.protocol=='https:')htprot='https'; 
					 document.write('<img '+parm+' src="'+htprot+'://stats1.saletrack.co.uk/scripts/stexit.asp?'+ data + '">'); 
					 //--> 
				</script> 
				<noscript> 
					<img src="http://stats1.saletrack.co.uk/scripts/stexit.asp?cid=251360&cs=<?php echo $subtotal; ?>&it=<?php echo $quantity; ?>&oi=<?php echo $orderid; ?>" border="0" width="0" height="0"> 
				</noscript> 
				<!--End Tracker-->
				<!--Google Tracker--> 
				<script language="JavaScript" type="text/javascript"> 
					<!-- 
					var google_conversion_id = 1070565847; 
					var google_conversion_language = "en_GB"; 
					var google_conversion_format = "1"; 
					var google_conversion_color = "FFFF66"; 
					var google_conversion_value = <?php echo $subtotal; ?>; 
					var google_conversion_label = "Purchase"; 
					//--> 
				</script> 
				<script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js"></script> 
				<noscript> 
					<img height="1" width="1" border="0" src="https://www.googleadservices.com/pagead/conversion/1070565847/?value=<?php echo $subtotal; ?>&label=Purchase&script=0">
				</noscript>
				<!--End Tracker-->
				<!--Kelkoo Tracker (Trade Doubler)-->
				<?php
					$org_id = 222404; 
					$orderValue = $subtotal;
					$orderNumber = $orderid;
					$event = 1211; 
					$currency = "GBP";
					$reviewstr = "name=".str_replace(' ', '', $orderdata['customers_name'])."&email=".$orderdata['customers_email_address']."&expDeliveryDate=".date("Y-m-d", mktime(0, 0, 0, date("m")  , date("d")+10, date("Y")));
					$reviewstr = urlencode($reviewstr);
					$reportInfo = '';
					$orderproductssql = "SELECT * FROM orders_products WHERE orders_id='".$orderdata['orders_id']."';";
					$orderproductsresults = mysql_query($orderproductssql) or die(mysql_error());
					while ($orderproductsdata = mysql_fetch_assoc($orderproductsresults)) {
						$reportInfo .= "f1=".$orderproductsdata['products_model']."&f2=".strip_tags($orderproductsdata['products_name'])."&f3=".number_format($orderproductsdata['final_price'], 2, '.', '')."|";
					}
					$reportInfo = substr($reportInfo, 0, -1);
					$reportInfo = urlencode($reportInfo);
					echo '<img src="http://tracker.tradedoubler.com/pan/TrackBackServlet?organization='.$org_id.'&event='.$event.'&orderNumber='.$orderNumber.'&orderValue='.$orderValue.'&currency='.$currency.'&reportInfo='.$reportInfo.'&reviewstr='.$reviewstr.' width="1" height="1">';
				?>
				<!--End Tracker-->
				<!--Price Grabber Tracker-->
				<?php
					$orderproductssql = "SELECT * FROM orders_products WHERE orders_id='".$orderdata['orders_id']."';";
					$orderproductsresults = mysql_query($orderproductssql) or die(mysql_error());
					$count = 1;
					$productlist = '';
					while ($orderproductsdata = mysql_fetch_assoc($orderproductsresults)) {
						$productnameparts = split(' - ', $orderproductsdata['products_name']);
						$a = $productnameparts[0].'|';
						$b = $orderproductsdata['products_model'].'|';
						$c = number_format($orderproductsdata['final_price'], 2, '.', '').'|';
						$d = $orderproductsdata['products_id'].'|';
						$e = '|';
						$f = $orderproductsdata['products_quantity'];
						$productlist .= '&item'.$a.$b.$c.$d.$e.$f;
						$count++;
					}
					$reportInfo = substr($reportInfo, 0, -1);
					$reportInfo = urlencode($reportInfo);
					echo '<img src="https://www.pricegrabber.com/conversion.php?retid=4516'.$productlist.'" />'."\n";
				?>
				<!--End Tracker-->
				<!--Shopzilla Tracker-->
				<script language="javascript">
				<!--
					var mid			= '101652';
					var cust_type	  = '';
					var order_value	= '<?php echo $subtotal; ?>';
					var order_id	   = '<?php echo $orderid; ?>';
					var units_ordered  = '<?php echo $quantity; ?>';
				//-->
				</script>
				<script language="javascript" src="https://www.shopzilla.com/css/roi_tracker.js"></script>
				<!--End Tracker-->	
				<!--Dealtime (shopping.com) Tracker-->
				<script language="JavaScript">
				<!--	
					var merchant_id = '307165';
					var order_amt = '<?php echo $subtotal; ?>';
					var order_id = '<?php echo $orderid; ?>';
				//-->
				</script>
				<script language="JavaScript" src="https://stat.DealTime.com/ROI/ROI.js?mid=307165"></script>
				<!--End Tracker-->
				<!--Nextag Tracker-->
				<?php
					$categories = '';
					$products = '';
					$units = '';
					while ($orderproductsdata = mysql_fetch_assoc($orderproductsresults)) {
						$csql = "SELECT cd.categories_name FROM categories_description AS cd INNER JOIN products_to_categories AS ptc ON dc.categories_id = ptc.categories_id WHERE ptc.products_id = '".$orderproductsdata['products_id']."' LIMIT 1;";
						$cresult = mysql_query($csql) or die(mysql_error());
						$categoryinfo = mysql_fetch_assoc($cresult);
						$categories .= $categoryinfo['categories_name']."|";
						$products .= $orderproductsdata['products_name']."|";
						$units .= $orderproductsdata['products_quantity']."|";
					}
					$categories = substr($categories, 0, -1);
					$products = substr($products, 0, -1);
					$units = substr($units, 0, -1);
				?>
				<script type="text/javascript">
				<!--
					var id = '748170';
					var rev = '<?php echo $subtotal; ?>';
					var order = '<?php echo $orderid; ?>';
					var cats = '<?php echo $categories; ?>';
					var prods = '<?php echo $products; ?>';
					var units = '<?php echo $units; ?>';
				//-->
				</script>
				<script type="text/javascript" src="https://imgsrv.nextag.com/imagefiles/includes/roitrack.js"></script>
				<!--End Tracker-->
				<!--Price Grabber Survey-->
					<script language="javascript" type="text/javascript">
						<!--
							popup_pos_x=200;
							popup_pos_y=20;
							popup_title_color = "#000080";
							popup_title_font_color = "#FFFFFF";
						//-->
					</script>
					<script language="javascript" src="https://www.pricegrabber.com/rating_merchrevpopjs.php?retid=4516" type="text/javascript"></script>
					<NOSCRIPT>
						<A href="https://www.pricegrabber.com/rating_merchrevpop.php?retid=4516" target=_blank><img src="https://images.pricegrabber.com/images/rating_merchpopup.gif" border="0" width="480" height="166" alt="Merchant Evaluation"></A>
					</NOSCRIPT>
				<!--End Survey-->
			</td>
  </tr>
		<tr>
	<td><?php echo tep_draw_separator('pixel-trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
  </tr>
  <tr>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel-trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" style="background: url(images/line-repeat-right.gif) top right repeat-y; padding-right:28px; padding-left: 5px" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<?
// osCoders.biz - Analystics - start 
include(DIR_WS_MODULES . 'analytics/analytics.php'); 
// osCoders.biz - Analistics - end
?>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

I have added the conversion goal on google anal... putting the link as http://thedac.co.uk/checkout-succes.php. I have added the code properly (to my knowledge) but it still isnt working.

 

Any help please?

Share this post


Link to post
Share on other sites

Now it works, big thanks pixclinic! But I have one more question - the revenue of the first transaction was correct but the second one shows up as 5.00 despite the price was 6990.00. How's that possible?

Share this post


Link to post
Share on other sites
Now it works, big thanks pixclinic! But I have one more question - the revenue of the first transaction was correct but the second one shows up as 5.00 despite the price was 6990.00. How's that possible?

 

Ok, now I'm confused - the first transaction that was correct just disappeared and the next ones have wrong value like 2.00 instead 2 111 and 1.00 instead 1 333. Only the TAXes are correct. Help, anyone?

Share this post


Link to post
Share on other sites
Ok, now I'm confused - the first transaction that was correct just disappeared and the next ones have wrong value like 2.00 instead 2 111 and 1.00 instead 1 333. Only the TAXes are correct. Help, anyone?

 

be sure your decimal separator is a point, and not a comma (if you ate in europe, that might be the case) and that no thousands separators are used

 

example:

 

1.025,24 (which might be thousand and twenty five point twenty four for a frenchman) is in fact one point zero twentwenty five twenty four for google

 

make sure your site formats the prices correctly

Share this post


Link to post
Share on other sites
be sure your decimal separator is a point, and not a comma (if you ate in europe, that might be the case) and that no thousands separators are used

 

example:

 

1.025,24 (which might be thousand and twenty five point twenty four for a frenchman) is in fact one point zero twentwenty five twenty four for google

 

make sure your site formats the prices correctly

 

You don't have to change your store settings; it is better to fix analytics.php to force the decimal separator to point and the thousands separator to null. The procedure to do this has been reported twice in this thread (posts 65 and 128).

 

Change each occurence of number_format() to add two parameters after the number of decimal places. There are four places that this is required. Here are the revised lines:

 

Line 45:

$analytics_total = number_format($totals['value'], 2,'.','');

Line 48:

$analytics_tax = number_format($totals['value'], 2,'.','');

Line 51:

$analytics_shipping = number_format($totals['value'], 2,'.','');

Line 71:

$item_string .= ' UTM:I|' . $order_id . '|' . $items['products_id'] . '|' . $items['products_name'] . '|' . $category['categories_name'] . '|' . number_format($items['final_price'], 2,'.','') . '|' . $items['products_quantity'];

 

--Glen

Share this post


Link to post
Share on other sites

Here is a much cleaner fragment for adding the basic tracking code, that works with both SSL and non-SSL pages.

 

<!--  osCoders.biz - Analytics - start

Conditional code added thank to  rrodkey and bfcase
IMPORTANT -- IMPORTANT - IMPORTANT
You'll need to update the "xxxx-x" in the samples (twice) above with your own Google Analytics account and profile number. 
To find this number you can access your personalized tracking code in its entirety by clicking Check Status in the Analytics Settings page of your Analytics account.
-->
<script src="<?php echo (($request_type =='SSL') ? 'https://ssl' : 'http://www')?>.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct="UA-XXXXXX-X";
urchinTracker();
</script>
<!--  osCoders.biz - Analytics - end -->

Edited by SteveDallas

Share this post


Link to post
Share on other sites
Thanks for the contribution. Its very helpful.

 

Is anyone here using it with the regular Authorize.net payment module that comes with osCommerce? I have two payment methods, paypal and authorize.net. The escommerce tracking works for paypal but not authnet.

 

Does anyone have ecommerce tracking working with Authroize.net SIM method? Or is anyone else having the same problem?

 

First off, kudos to OSCODERS for a great contrib!

 

I use authorize.net and Paypal too but most everything works including MOST of the ecommerce side. Products and Orders are registered (both on Paypal and Authorize.net Transactions) but only about 10% of goals are registering and 90% of transactions are registering

 

Is anyone else using authorize.net, and got their Funnels Conversion and Transaction Lists to work properly?

 

My problem is the following:

1. Funnels do not totally work on the goal page. I will see GA report that 2 sales/goals but I actually had 10 sales. This is evident when you look at GA's under ECommerce transaction list (a different report) that shows 10 sales with all products that were purchased. The initial steps of the funnel seem to be working fine. For example

 

Shipping Method: 64 Visits

Payment Method: 55 Visits

Checkout Confirmation: 51 Visits

Order Completed : 5 Visits.

 

I know that I had 20 orders (according to oscommerce admin) for those stats but why is it only showing 5?

 

2. OK, transaction list is a little better than funnels but it still does not show ALL transactions. For example, oscommerce admin will show my order numbers from 5000 to 5020. That should be 20 orders in all. But the GA transaction list, will have around 2 missing. I verified that these were legit orders and they are paid via authorize.net. I can also assume that the Product Performance page on GA is also innacurate - I haven't verified it but I'm guessing.

 

Conclusion: I have 2 theories:

 

1. On the Funnels thing, I think Google detecting an "EXIT" when checkount_confirmation.php calls checkout_process.php which in turn sends the user to authorize.net to run the transaction? Therefore, when Authorize.net returns the user back to checkout_success.php, GA will assume that the person has already exited the funnel and therefore does not count the goal even though the code is there? But then, if this is so, then why are there still 5 conversions? Has anyone got this to work accurately?

 

2. On the Transaction List vs. OsCommerce Admin Orders List, GA code is always rendered but I think the google servers may for one reason or another (server load?) occassionally ignore calls to the the urchin stats. This could be the cause to the GA Transaction List not being equal to my oscommerce admin list.

Share this post


Link to post
Share on other sites

I have installed the tracking code in our site but the ecommerce sale info isn't showing up correctly. It is not possible for us to add

 

onLoad="java script:__utmSetTrans()

 

In the Body tag because the body tag is in the header.php, universal to all content files. Can we add the above code to a <div> tag in checkout_success.php? How will itaffect the

 

include(DIR_WS_MODULES . 'analytics/analytics.php');

 

which we then included just above the </div> tag? The transaction information does show up in the output HTML code in checkout_success.php, but the information is not regarded in GA. Any idea?

Share this post


Link to post
Share on other sites
I have installed the tracking code in our site but the ecommerce sale info isn't showing up correctly. It is not possible for us to add

 

onLoad="java script:__utmSetTrans()

 

In the Body tag because the body tag is in the header.php, universal to all content files.

How did the Body tag get put into header.php? You must not be working with the standard MS2.2 release of osC.

 

I can understand the reasoning behind moving the header info to a template file, but, in my opinion, the Body and /body tags belong in the content files.

 

--Glen

Share this post


Link to post
Share on other sites

I have a question. If you add the Analytics code in your footer.php is it ok also to install this contrib?

 

Basically, it appears you would just have the code repeating itself. I know in the instructions it says to have the variables brought by analytics.php in this contrib BELOW the standard code.

 

Will it "double track"?

 

How do people have this set up with their pages throughout the site?

 

Thanks

Share this post


Link to post
Share on other sites

Well, I looked at the code in checkout_success and it appears that footer is called above analytics.php.

 

So, I am thinking that this should be fine. The only other thing added in checkout_success was the javascript to the body tag - but, I am not sure if that will matter or not.

 

Any ideas?

Share this post


Link to post
Share on other sites

Sorry for multiple replies.

 

It appears there may be a problem because google instructions say:

 

<body onLoad="java script:__utmSetTrans()">

 

should be BELOW the standard tracking code.

 

The footer is above the analytics.php inclusion, but if you placed the code in the footer, it would not be above this body onLoad instruction.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×