Jump to content

Implementation of tracking pixel


Recommended Posts

Does any one know how to implement a thirdparty traciking pixel, for registering sales through an affiliate network?

I assume that the code should be implemented on the order-confirmation.tpl page, but where and what variables to use?

Ex.: (in an IMG tag)
http://www.ad-network.com/salestracking.php?type=sale&ordernumber;=[Order_id??]&porductnummer;=[Prod_nr??]&amount;=[ammount??]&totalcost;=[Price_total??]

I would appreciate any help on this issue.

Thanks in advance, for any contribution on this subject.

Link to comment
Share on other sites

  • 3 weeks later...

I made a module to solve this. The tracking pixel is displayed when the order has been confirmed. There is a problem, however, if the payment method is e.g. cheque or bankwire. In that case your affiliate will register the order as completed even if you haven't received the payment yet. I can't see an immediate solution for this since the tracking pixel must be requested by the customer's browser. It would not work if you requested the tracking pixel later on when the payment was actually received.

I have attached my module. You will have to change the tpl file and insert your img code.

2011-01-26: Updated with total products w/o shipping.

/Kjeld

affiliatetracking_0.2.zip

  • Like 2
Link to comment
Share on other sites

  • 1 year later...
I made a module to solve this. The tracking pixel is displayed when the order has been confirmed. There is a problem, however, if the payment method is e.g. cheque or bankwire. In that case your affiliate will register the order as completed even if you haven't received the payment yet. I can't see an immediate solution for this since the tracking pixel must be requested by the customer's browser. It would not work if you requested the tracking pixel later on when the payment was actually received.

I have attached my module. You will have to change the tpl file and insert your img code.

2011-01-26: Updated with total products w/o shipping.

/Kjeld


So where would I put the img code (sale.cfm?amount=AMOUNTOFSALE&tracking=TRACKINGNUMBER&transtype=TYPEOFTRANSACTION&merchantID=XXXX)below?:


Order ID: {$orderId}


Total (w/o shipping): {$total}


Total paid: {$totalPaid}


Total products: {$totalProducts}


Total commission (10 %): {$totalCommision}


Currency: {$currency}


Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...
  • 1 month later...
  • 2 months later...

I've tried a many different ways and can't seem to get the tracking to work, the tracking code i am trying to implement is this:

<!-- Offer Conversion: Tracking Pixel 1 -->

<iframe src="
scrolling="no" frameborder="0" width="1" height="1"></iframe>

<!-- // End Offer Conversion -->

My ad server instructions say: "Advertiser must place the iFrame conversion tracking pixel below on the confirmation page near the opening body tag. When the pixel is displayed to a user, it records a conversion."

 

Problem is that the prestashop order-confirmation.tpl does not have any body tags..

 

Also, do i replace AMOUNT with {$total} - and where would i put {$orderId} ?

 

And is it really necessary to install this plugin by presta-dyr if we can simply place the code in order-confirmation.tpl ?

 

Thanks in advance for anyone who provide some insight into this issue for me!

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 5 weeks later...
  • 4 weeks later...

The solution for this problem is indeed using the affliliate tracking code that is pretty smart. However it needs a little coding in order to get the values you need inside the php and tpl files. I will just place the code inside the tpl file and that's it. Also i think this can be a good way to track revenue for adwords campaigns.

 

Olimpiu

Link to comment
Share on other sites

  • 2 months later...

You should have a single line in the .tpl file:

 

<img src="https://shareasale.com/sale.cfm?amount={$total}&tracking={$orderId}&transtype=TYPEOFTRANSACTION&merchantID=XXXX" width=1 height=1>

 

You will have to insert proper values for TYPEOFTRANSACTION and XXXX.

 

 

/Kjeld

Hi!

How to get total item count of the order?

Is it possible?

 

Thanks in advance for the help.

Bye

Link to comment
Share on other sites

  • 2 years later...

Is this method still usable in PS 1.5?

 

I end up on different URL's depending on if the user is registered or guest – and depending on payment method (I'm using QuickPay). Therefore, in my tests, the affiliatetracking.tpl is never fired (e.g. when ending up at /order-history).

 

Any way to solve this?

Link to comment
Share on other sites

×
×
  • Create New...