Hello,
I am new to x-cart so please bear with me on this one.
I am looking to set up a pay per action and percentage of sale marketing campaign with
www.snap.com. In order to do this a block of php code must be entered into our software. The code is as follows:
Code:
<?php
// SNAP.COM VCPA TRACKING CODE v2.0 PHP VERSION
// Instructions:
// Modify this PHP script as indicated below in the comments. When
// you are done, paste it in the confirmation or thank you page of
// your website. This is the page you display when a transaction is
// completed. It generally thanks your customer for the order. An
// assumption is made that this page contains the amount of the
// sale that can be passed to this PHP script.
// Replace CAPITALIZED TEXT below as indicated.
// Replace ADVERTISER_ID below with your snap.com advertiser ID. You
// can find your advertiser ID in your signup email or on any of the main
// pages inside your account. If your advertiser ID is 321, for example,
// the following line would read: $advertiser_id = 321;
$advertiser_id = ADVERTISER_ID;
// Replace PASSKEY below with your snap.com tracking passkey you
// entered in the get tracking code wizard. If you change the passkey
// in the wizard, you must also change it here. The passkey in this
// tracking code must match the passkey stored in your account.
$passkey = 'PASSKEY';
// Replace ITEMCOST below with the variable from your system that contains
// the actual dollar amount of the sale. For example, if the variable
// your system uses is called $totalsale, then you would change the
// following line to say: $sale_amount = $totalsale;
$sale_amount = ITEMCOST;
// Do not modify the following lines
$signature = md5($advertiser_id . $sale_amount . $passkey);
$query_string = "aid=$advertiser_id&amt=$sale_amount&sig=$signature";
$pixel_url = "https://adsys.snap.com/count/?$query_string";
// The <img ...> tag below must be embedded between the HTML <BODY></BODY>
// tags in this page.
?>
[img]<?php echo $pixel_url; ?>[/img]
I am not sure where the best place to put this code would be. I do have some general ideas, but havent come to a certain conclusion. I would like to minimize the risk that someone makes a purchase, but doesnt follow through with the payment, and I still get charged by snap.com. I dont think I can avoid this risk, seeing as our site takes payment in the form of credit cards, gift certificates, and paypal, of which the credit cards and paypal payments are done via a third party website.
Please let me know if you can help me with this problem, because I would really like to use this less risky version of marketing our site.