I am trying to place my tracking pixel on a website to track conversions.
[PHP]<img height="1" width="1" border="0" style="display: none;" src="https://mytrackingurl.com/tracking202/static/gpx.php?amount=5" />[/PHP]
The website is an Oscommerce website and this would be placed on the page displayed once the visitor creates a user.
This is the code, but I'm not sure or where to place the pixel on the code. I appreciate any help you guys can provide!
[PHP]
<?php
/*
$Id: create_account_success.php,v 1.30 2003/06/05 23:27:00 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');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT_SUCCESS);
$breadcrumb->add(NAVBAR_TITLE_1);
$breadcrumb->add(NAVBAR_TITLE_2);
if (sizeof($navigation->snapshot) > 0) {
$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
$navigation->clear_snapshot();
} else {
$origin_href = tep_href_link(FILENAME_DEFAULT);
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="col_left">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</td>
<!-- body_text //-->
<td width="100%" class="col_center"><?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<? tep_draw_heading_top();?>
<? new contentBoxHeading_ProdNew($info_box_contents);?>
<? tep_draw_heading_top_1();?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE); ?></td>
<td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr><td class="main smalltext"><?php echo TEXT_ACCOUNT_CREATED; ?></td></tr>
</table>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0"><tr><td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr></table>
<?php /* echo tep_draw_infoBox_top(); */?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="right"><?php echo '<a href="' . $origin_href . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table>
<?php /* echo tep_draw_infoBox_bottom(); */?>
<? tep_draw_heading_bottom_1();?>
<? tep_draw_heading_bottom();?>
</td>
</tr>
</table></td>
<!-- body_text_eof //-->
<td class="col_right">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</td>
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //--></body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>[/PHP]
Just put it near </body>? It's just a 1x1 pixel image so it's unlikely to mess up the layout of your page or anything like that, and should load fine wherever it is provided your page has no loading issues.
I placed it just before </body>. But upon testing it didn't fire up. I tried putting it after <body> and before </body>. Maybe I need to enable something else php wise?
Instead of using a "Simple Pixel" I placed a "Universal Smart Tracking Pixel" which is the iframe one, just before </body> and it works now. Takes a bit more to load the page, but it loads it. Thanks for helping Zeno!
Have you tried running through your funnel yourself on a proxy, in incognito or some private mode to make yourself appear to be a user? It's not a PHP postback so it wont just fire off correctly from loading your page, you'll need to start from wherever prosper starts tracking you.