You are here:  » Add tracking code

Support Forum



Add tracking code

Submitted by purecountry on Sun, 2008-07-20 19:52 in

I already have the tracking code in my database and need to put it into the template. Where do I add it and what code do I use?

It needs to go on the product page since each product has a different tracking code.

In reference to my other problem, I have that figured out. I go all the way from Category, subcategory to product group. Works perfectly.

Thanks for your help,

Al

P.S. I thought I saw a post somewhere but can't find it. May have overlooked it.

Submitted by support on Mon, 2008-07-21 08:52

Hi Al,

There are 2 subtly different way in which the term "tracking code" is used with affiliate marketing...

There is code that you need to render directly into the product page that probably includes an invisible image that registers an impression with the affiliate network; or more commonly it is used to refer to your own parameters that you add to the affiliate URL that enable you to group sales together for reporting purposes.

As you mention the code needing to go on each product page, i'm assuming that you're referring the first type of tracking code; and that you have added the tracking code to the database and that it just needs to be displayed raw on the product page.

To do this, within the main body of html/product.php; all the fields from the products table for the product being displayed are in the $mainProduct array; so if you have called your field "tracking_code"; you could simply add the following on the last line:

<?php print $mainProduct["tracking_code"]; ?>

Cheers,
David.

Submitted by purecountry on Mon, 2008-07-21 09:44

Thanks David.

Submitted by support on Mon, 2008-07-21 16:11

If you have multiple installations each should display its own featured products; so it must be something specific to the way you have setup your hierarchy; in other words I presume that you have setup something more complex than just multiple installations per master-category in their own sub-directories. If you could email me a link to the installation and describe how it has been setup i'll have a look for you...

Cheers,
David.

Submitted by purecountry on Mon, 2008-07-21 21:13

I only have on my local server right now until I finish setup and then am uploading the whole setup later this week. I am going to try a couple of different things. I will let you know how it turns out.

Submitted by purecountry on Mon, 2008-07-21 21:21

I forgot to add.

My setup
Main installation
subfolders under the the main installation - Categories
subfolders under those subfolders - Subcategories
Subcategory folders complete the search for me for my product groups.

Now I can set it up so each folder is in its own installation all I would need to do is change my navigation links and tie my feed imports into one feed as in node/2061.