zalchriszalchris MitgliedKommentare: 9 Danke erhalten: 1 Mitglied seit: Juli 2015

Hallo!

Ich habe angefügtes Javascript im Theme in die /frontend/checkout/finish.tpl eingefügt.

Es soll ein Tracking Pixel feuern. Die Ausgabe auf der Success-Seite ist laut Quelltext auch OK, nur leider wird das Pixel nicht gefeuert.

Kann mir hier jemand weiterhelfen?

 

<script type="text/javascript">
// Your organization ID; provided by Cashback World.
var organization=2180429;
//
// Event ID; provided by Cashback World.
var event=380921;
//
// Value of the sale; sale specific value has to be assigned dynamically out of the shop database. The orderValue is the basis for the commission paid to Cashback World.
var orderValue = "{$sAmountNet}";
//
// Currency of the sale. For example “USD” for US-Dollar, or “EUR” for Euro.
var currency = "EUR";
//
// A unique identifier for the transaction. You should assign your internal shop order number dynamically out of your shop database. For a sale, this is typically the order number which is also shown to a customer in the order confirmation.
var orderNumber = "{$sOrderNumber}";
//
// Event type:
// true = Sale
// false = Lead
var isSale = true;
//
// Encrypted connection on this page:
// true = Yes (https)
// false = No (http)
var isSecure = true;
//
// OPTIONAL: You may transmit a list of items ordered in the reportInfo parameter. See chapter reportInfo (3.4.7.) at the “Tracking Implementation” Manual for details.
var reportInfo = ""; reportInfo = "f1=" + Product1Name + "&f2=" + Product1ID + "&f3=" +
NumberOfProduct1 + "&f4=" + Product1Price + "|f1=" + Product2Name + "&f2=" + Product2ID + "&f3=" +
NumberOfProduct2 + "&f4=" + Product2Price;
reportInfo = escape(reportInfo);
//
function getCookie(name)
{
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1)
{
begin = dc.indexOf(prefix);
if (begin != 0) return null;
}
else
{
begin += 2;
}
var end = document.cookie.indexOf(";", begin);
if (end == -1)
{
end = dc.length;
}
return unescape(dc.substring(begin + prefix.length, end));
}
var tduid = getCookie("TRADEDOUBLER");
/***** IMPORTANT: *****/
/***** In most cases, you should not edit anything below this line. *****/
if (isSale)
{
var domain = "tbs.tradedoubler.com";
var checkNumberName = "orderNumber";
}
else
{
var domain = "tbl.tradedoubler.com";
var checkNumberName = "leadNumber";
var orderValue = "1";
}
//
//Create the checksum. See chapter checksum (3.4.1.) at the “Tracking Implementation” Manual for details.
var checksum = "xxx";
//
if (isSecure)
var scheme = "https";
else
var scheme = "http";
//
var trackBackUrl = scheme + "://" + domain + "/report" + "?organization=" + organization + "&event="
+ event + "&" + checkNumberName + "=" + orderNumber + "&checksum=" + checksum + "&tduid=" + tduid +
"&type=iframe&reportInfo=" + reportInfo;
if (isSale)
{
trackBackUrl = trackBackUrl + "&orderValue=" + orderValue + "&currency=" + currency;
}
//
function prepareFrame(tburl){
ifrm = document.createElement("IFRAME");
ifrm.setAttribute("src", tburl);
ifrm.style.width = 1+"px";
ifrm.style.height = 1+"px";
ifrm.style.border = "none";
document.body.appendChild(ifrm);
}
prepareFrame(trackBackUrl);
</script>

 

Antworten

Anmelden oder Registrieren, um zu kommentieren.