Post by Rainforest » Sun Sep 25, 2011 7:01 am

Shopping.com has a merchant program and the ability to track the clicks from their customers.

In order to track clicks that are from them you can add some javascript code to the checkout page.

what file in opencart would that be?


From Shopping.com

Upon checkout at your website, you will need to transmit some information to Shopping.com for detailed ROI reporting. This data is sent by including it in the URL of a 1x1 pixel invisible .gif requested from a Shopping.com server. An external JavaScript routine requested from a Shopping.com server constructs the URL and writes an IMG tag (this is the 1x1 pixel invisible .gif ) into the page.
The external JavaScript routine expects some JavaScript variables to have been defined by you on the page on your site. These variables contain the data about the order that you wish to track.


Sample Code To insert
<script language="JavaScript">
var merchant_id = '12345'
var order_id = 'PUT_YOUR_DATA_HERE'
var order_amt = 'PUT_YOUR_DATA_HERE'
var category_id = 'PUT_YOUR_DATA_HERE'
var category_name = 'PUT_YOUR_DATA_HERE'
var product_id = 'PUT_YOUR_DATA_HERE'
var product_name = 'PUT_YOUR_DATA_HERE'
</script>
<script language="JavaScript" src="https://stat.DealTime.com/ROI/ROI.js?mi ... "></script>

Self Taught Opencart User & Developer Since 2010.


User avatar
Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by uksitebuilder » Sun Sep 25, 2011 5:37 pm

Going to need more work than that because those variables are not available in the checkout success page.

There has been a recent discussion on this and I believe Qphoria is going to create a vqmod file to make these variables available.

It is also going to be added to the core in a future release.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Rainforest » Mon Sep 26, 2011 6:35 am

Got it.

Now, let's say I'm just adding the shopping.com merchant variable ( they provide this). What open cart file would I edit to ass the tracking code? I'm sure its checkout.something

Tx

Self Taught Opencart User & Developer Since 2010.


User avatar
Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by uksitebuilder » Mon Sep 26, 2011 2:32 pm

catalog/view/theme/default/template/common/success.tpl

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom
Who is online

Users browsing this forum: No registered users and 2 guests