PDA

View Full Version : Affiliate Program Tracking Code


greg watson
12-15-2005, 05:22 AM
I need some help with GMart variables ... I use an affiliate program to track sales and pay commissions to affiliates. To do this, we insert an "image tag" into the order process and also the order confirmation page.

I need to insert an image tags containing some GMart variables into the gmart_paypal_process template and the gmart_thanks template.

I think I need to insert the following code into the gmart_paypal_proces:

<img src="http://www.assoctrac.com/12345/track/sale/

?order=order_id;desc_1=product;price_1=price;qty_1 =quantity;commit=0>

And I need to insert the following code into the gmart_thanks template.

<img src="http://www.assoctrac.com/12345/track/sale/?order=order_id;commit=1>

In both lines, I need to figure out the GMart variables to substite for:


order_id
product
price
quantity


Can you help me with what code I need?

Thanks,
Greg

The Geek
12-15-2005, 07:14 AM
ill have to pop open the code tonight and have a look during those processes.

greg watson
12-15-2005, 01:59 PM
ill have to pop open the code tonight and have a look during those processes.

Thank you ...

If you are going to pop open the code and look at it ... a few extra thoughts about a future feature request would be greatly appreciated ... it sure would be nice if you could add two blank templates GARS_tracking_in and GARS_tracking_out that would allow people to put whatever tracking code they wanted into those templates ... There are a lot of people that use tracking code like Google's to track conversions for Adwords ...

Thank you for looking when you get a chance ...

Thanks,
Greg

kidmercury
12-15-2005, 03:42 PM
a few extra thoughts about a future feature request would be greatly appreciated ... it sure would be nice if you could add two blank templates GARS_tracking_in and GARS_tracking_out that would allow people to put whatever tracking code they wanted into those templates ... There are a lot of people that use tracking code like Google's to track conversions for Adwords ...

i have not bought gmart yet, definitely got my eye on it though -- and when i do get it, i will definitely be interested in the kind of feature noted above. anyway, just wanted to mention that :)

The Geek
12-15-2005, 03:53 PM
I would love to, but I have no clue what you mean :)

If I had some good examples, Im sure I could do something though!

greg watson
12-15-2005, 09:34 PM
I would love to, but I have no clue what you mean :)

If I had some good examples, Im sure I could do something though!

If this question was directed to me ...

Above, I gave you two sets of code snipets that I need to be able to insert into the order flow process ... my original question asked for your help to help me identify the GMart variables that you use ... so that I could insert that code into my best guess of the appropriate templates in the order flow process.

As soon as you have a chance to identify the variables that you used, it is pretty easy to insert the short snippet of tracking code into an already existing template such as the two templates that were my best guess of where the code needed to be inserted ...

Since you know the order flow process better than anyone else ... you probably know where tracking code needs to be inserted better than anyone else <grin> ...

Let's assume that the GMART_thank_you template is one of the correct places that this code needs to be inserted ... wouldn't it be easier to pull this code from either a database field or a tracking code template? That way each time the GMART cart gets updated, we do not have to edit the updated GMART files with the tracking code (or future customers don't have to try to figure out where the code needs to be inserted - you know my best guess, but I don't know if its right<grin>).

Every affiliate program or tracking code is just a little bit different, so a nice database field or blank template that we could insert that custom code into would be greatly appreciated ...

So ... the question comes back to you ... in the example I first posted above, I showed you the two pieces of code that I need to insert into the GMART cart ... so question #1 .. what GMART variables do you use to represent each of those items (Order ID, Product Description, Quantity, and Price) ... and question #2 ... which GMART templates do I need to insert each of those two code snippets into your GMART order flow process?

So when you ask for an example <grin> ... you have a perfect one above <grin>!!!

Thanks,
Greg

The Geek
12-16-2005, 07:10 PM
Does the tracking code only have to appear one?

greg watson
12-16-2005, 09:15 PM
Does the tracking code only have to appear one?

Above, I displayed two different tracking codes ... one is for the order process when an order is placed, this one allows you to specificy and track specific products ... thus it is an image tag that contains an order ID, Product ID, Price, and Quantity ...

The Second tracking code is the payment confirmation image tag ... and it really only has to have the Order Id ...

So there are two different image tags ...

Ideally the first image tag would be included where you "add" an item to your cart ...

Ideally the second image tag would be in the payment confirmation screen to show the order has been paid for ...

Greg

greg watson
12-19-2005, 05:35 PM
ill have to pop open the code tonight and have a look during those processes.

Did you get a chance last week to ever pop open the code and see what variables you use for:


order_id
product
price
quantity


Thanks,
Greg

The Geek
12-19-2005, 05:58 PM
Ive been pouring over the code and tweaking the last few days. Ill have to double check when I get home - however what is going to be difficult is getting each item code, price and quantity.
By the time you are at paypal mode, the order is wrapped up and the lines are not directly availible.
In other words, if you buy 2 items, are you supposed to do 2 tracking lines?

greg watson
12-19-2005, 06:58 PM
Ive been pouring over the code and tweaking the last few days. Ill have to double check when I get home - however what is going to be difficult is getting each item code, price and quantity.
By the time you are at paypal mode, the order is wrapped up and the lines are not directly availible.

That just looked like the most convenient place to me ...

In other words, if you buy 2 items, are you supposed to do 2 tracking lines?

It would be helpful ... The code can actually be put in earlier in the order process when items are added to the cart ... but there really needs to be an "order Id" created that early in the process ....

The most critical thing for me is to be able to match up an order ID ... I can match up 2 "add products" tracking lines to one order payment tracking line just fine as long as I have an Order ID ...

For me ... the added value of having an Order ID early ... is that I can setup an affiliate program to pay different commissions on different product items. For example, if we use Geek Products as an example ... we could setup the GMart product ID to have a 75% commission, GAL to have a 50% commission, and GARS to have a 25% commission ...

So if I can put the tracking code in earlier in the order process back when an item is added to a cart ... the affiliate program will be able to track individual items, calculate an individual commission by product ... and then ... when payment is received "approve" the sale ... and pay the appropriate commission ...

I looked at the GMart templates ... I don't know which templates are used earlier in the process ...

Does that help any?

Greg

The Geek
12-19-2005, 07:02 PM
hmmm, a bit - sorry for being do vauge - im just trying to get my head around what youre asking for.

The orderid is created when the user buys. Beofr that, there is only a cartid (which I used to use for the orderid, but thats a different story!).
Anyway, im wondering if a module would work for you.

Is is a visible image that has to be displayed or is there some other way to communicate to them?

greg watson
12-19-2005, 07:12 PM
hmmm, a bit - sorry for being do vauge - im just trying to get my head around what youre asking for.

It's always tough to merge programming terms with operational terms with marketing terms with etc etc etc. ... <grin> ...

The orderid is created when the user buys. Beofr that, there is only a cartid (which I used to use for the orderid, but thats a different story!).
That's not suprising <grin> ...

Anyway, im wondering if a module would work for you.

Since whatever your definition of "module" is probably has no relationship to what my definition of "module" is <grin>... my answer would be no ...

I've installed this affiliate software is about five shopping carts ... it is one of the absolute simplest integrations I've ever had to do ...

The only real hard part is to figure out "where" to insert the code in the process and "what" the variables are to substitute ...

Is is a visible image that has to be displayed or is there some other way to communicate to them?

There is no actual image shown ... the image tag is just used as a way to pass the variables to the affiliate software ... its an ingeniously simple solution ...

Customer adds product X to the cart cart ... an image tag is called which passes the order id, the product id, the price, and the quantity to the affiliate program ...

i.e. this:

<img src="http://www.assoctrac.com/12345/track/sale/

?order=order_id;desc_1=product;price_1=price;qty_1 =quantity;commit=0>
If the customer abandon's the shopping cart ... this dead data just sits in the database and nothing gets done with it ...

If the customer checks out through the shopping cart and pays ... then the payment thankyou screen calls an image tag which passes the order id, and the amount to the affiliate program ...

i.e. this:

<img src="http://www.assoctrac.com/12345/track/sale/?order=order_id;commit=1>

Ingeniously simple ...

Greg

greg watson
01-05-2006, 05:00 AM
12-15-2005 , 02:14 AM ill have to pop open the code tonight and have a look during those processes.

Have you had a chance yet to look up what variables you use for:


order_id
product
price
quantity


If you can just give me the variable names ... I'll test ...

Thanks,
Greg

The Geek
01-05-2006, 09:59 AM
The problem is that you cant access them as such there, so I retweaked the code to enable you to.

I have a new update on GM where I added the ability to grab this information at process time. However there are several other additions that require more testing before I can release it - and im investigating a couple other bugs. SHould have something soon.