Jump to content
ImPresta

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Takker Presta-dyr,

Det var lige hvad jeg manglede :)

Jeg kan se at du også havde lavet en block til Trustpilot, men linket virker vist ikke mere.

Mvh Rune

Share this post


Link to post
Share on other sites

I'm glad you could use it.

Please continue the discussion about the TrustPilot module in the Danish forum.

/Kjeld

Share this post


Link to post
Share on other sites

Updated the module with values for total paid without shipping and total commission (hard-coded to 10 %).

/Kjeld

Share this post


Link to post
Share on other sites
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}


Share this post


Link to post
Share on other sites

Hi,

this should be good extension for me but I tried install in on presta 1.4 and it doesn't work(error: file is corrupted?).. any advice please?

Thanks!

Share this post


Link to post
Share on other sites

excelent, I found the way how to do it!

thanks for sharing buddy!

Share this post


Link to post
Share on other sites
excelent, I found the way how to do it!

thanks for sharing buddy!


Hi there,

How did you do it? Is it compatible with the newest version of Prestashop? (v1.4)?? Please share how you made this work.

Kind regards,

Mark

Share this post


Link to post
Share on other sites

If someone needs help implementing the shareasale tracking pixel in their shopping cart, let me know.

Thanks again to Kjeld for sharing this.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

I believe it will work with PrestaShop 1.5 but I have not tested it. But you need an updated version of the Quickpay module.

 

 

/Kjeld

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More