View Full Version : Affiliate Tracking
stuartn
25-Jan-2003, 02:54 PM
Hi,
I have been having a look at integrating an Affiliate Tracking package into our site, which has meant adding some code to order04.html. Problem that I have found, is that the Affiliate software requires me to call it as an image (so that it always gets called automatically) but with an incrementing counter so that it knows which product it is currently looking at
ie.
<img src="http://affiliatepath/sale.cgi?desc_x=<Product Name>&quant_x=<Quantity of PRoduct>&Price_x=<Price>">
where x is the incrementing counter.
I have found that I need to do this in JavaScript, so that I can have an incrementing counter variable (it starts from zero each time), but that then gives me problems regarding where I place the code as Actinic only seems to know about its NETQUOTEVAR tags on certain parts of the page (ie. if I send it in the Price column in the Order04.html table, then it doesn't know what NETUOTEVAR:PRODUCTNAME or QUANTITY are, and vice versa).
Anyway, if anyone has any suggestions or tips then it would be greatly appreciated, as I seem to be going down the same avenues with it.
Cheers,
Stuart
Hi Stuart
There is a section in the version 6 Advanced User Guide that covers setting up an affiliate program link (see the section called 'Supporting an Affiliate Program with Actinic Ecommerce').
Does this help?
Ben Popplestone
Actinic Software
http://www.actinic.co.uk
TiggyPig
27-Jan-2003, 11:10 AM
Can I ask which Affiliate program or company you are going to use?
stuartn
27-Jan-2003, 06:49 PM
Hi,
Thanks for the replies.
The affiliate program we are hoping to use is Assoctrac 2.5 - seems to be fair enough from what I have seen so far.
Ben - I had seen the Advanced User Guide section on Affiliates, and it gave a couple of hints but only thing is that we only want to give out commision on the SubTotal (ie. not on the Tax or Shipping), but seem unable to find a NUMERICORDERTOTALCGI equivalent for the SubTotal. I really need to use a Numeric version otherwise the Affiliate software just doesn't like it (I have also been annoying them about it as well :) )
I seem to have managed to blag my round the other problems which were being caused by having to use JavaScript in order to have an counter which incremented on every product, and then the other problem of only being able to call some NETQUOTEVARs in certain sections of the Receipt page ( ie. I cannot call the PRODUCTPRICE one in the PRODUCTNAME section of order04.html and vice versa).
Anyway, I reckon that if we can get a Numeric version of the SubTotal then we will be sorted (hopefully!!!)
Cheers again,
Stuart
cdicken
28-Jan-2003, 04:13 PM
I'm afriad sub-total is not available as an unformatted numerical NETQUOTEVAR. I suppose you could divide the order total by 1.175 to get ex-vat, but this does not get around the shipping (unless you use a flat rate and can just remove this figure from the order).
Sorry about that. I have added it to the wish list.
stuartn
28-Jan-2003, 09:06 PM
After a bit of guessing and swearing, I managed to write a piece of JavaScript which formats any of the Actinic prices into a simple Numeric value - seems to work so hopefully that'll be this Affiliate integration sorted out.
Thanks for your suggestions and help.
Cheers,
Stuart
cdicken
29-Jan-2003, 09:11 AM
Would you be willing to post your script function on here? - I'm sure some other developers would benefit.
stuartn
29-Jan-2003, 11:57 AM
Yep - no problem. Will post it on here probably tomorrow evening, with a few comments to help.
lee.harris
14-Mar-2003, 05:31 PM
Hi Stuart
Any chance of that posting :)
I'm struggling to convert NETQUOTEVAR:ACTINICORDERTOTAL into pounds and pence from pence.
Cheers
Lee.
TiggyPig
17-Mar-2003, 07:49 AM
I have the scripts here for NETQUOTEVARS for:
Total
Subtotal
Tax1
Tax2
Shipping1
Shipping2
It's pants to say that ACTINIC don't have those values. I offered to sell them the scripts as so many people were asking for it and they weren't interested.
The offers still open guys....... Contact me and you can have the scripts.....
memix
13-Jun-2003, 08:24 AM
Hi
I am trying to set up an affiliate link and would appreciate you emailing me the code if that would be ok.
jmoss@memixdirect.com
magicant
18-Jul-2004, 02:12 PM
Hi, just bought Assoc Trac 4 for my Actinic store at www.magicworld.co.uk
Can someone please help me with the integration... As mentioned above I need some javascript?
The code Assoc Trac asks me to put in is:
<img src="http://www.assoctrac.com/12345/track/sale/?
desc_1=printer;price_1=99.95;qty_1=1
desc_2=cartridge;price_2=19.95;qty_2=3;
order=code to generate order ID;commit=1">
I guess I simply exchange the "code to generate order ID" with the netquotevar variable for order code etc, but what about the rest.
If anyone can help i'd be most grateful
Thank you
Anthony
www.magicworld.co.uk
cdicken
19-Jul-2004, 09:07 AM
Check out http://community.actinic.com/showthread.php?t=3825 for some useful code and examples.
stuartn
19-Jul-2004, 09:09 AM
Sorry, meant to post this ages ago and totally forgot. I placed this code immediately after NETQUOTEVAR:SUBTOTAL inside the <SPAN> for it.
<script>
testPrice = "NETQUOTEVAR:SUBTOTAL";
var i;
var SecondAmp = 0;
var FullPrice = "";
for (i = 0; i < testPrice.length; i++)
{
// Search through string and append unfiltered values to returnString.
var c = testPrice.charAt(i);
if (c == "&")
{
if(i != 0)
{
SecondAmp = i;
}
}
}
var FirstPrice = testPrice.substring(6,SecondAmp);
var SecondPrice = testPrice.substring(SecondAmp + 5, SecondAmp + 7);
// create the fullprice
FullPrice = FirstPrice + "." + SecondPrice;
// we always send a constant product description, but this could easily be dynamic
var ProductDesc = "Affiliate Sale ";
ProductDesc = ProductDesc + "£" + FullPrice;
// then dynamically create an image which quietly sends off our info
document.write("<img src='http://assoctrac.com/2.0/{our userid}/sale.cgi?desc_1=" + ProductDesc + "&price_1=" + FullPrice + "&qty_1=1'>");
</script>
Hope this helps.
Cheers,.
Stuart
magicant
19-Jul-2004, 03:59 PM
Looking everywhere for the NETQUOTEVAR:SUBTOTAL in Act_Order04.html Doesn't seem to be in !
Can anyone help me find it, or let me know if the above code should be put elsewhere?
Thanks
Anthony
www.magicworld.co.uk
magicant
20-Jul-2004, 08:46 PM
I would like to pass the product name in the order to my affiliate program... is this possible?
If it is could someone please give me an example? Whatever the Netquotevar, it would have to be transferred into the javascript code I currently have (PASTED BELOW) to make it work with my current script.
Thank you
=========CODE I CURRENTLY HAVE=============
<script>testPrice = "NETQUOTEVAR:SUBTOTAL";
var i;
var SecondAmp = 0;
var FullPrice = "";
for (i = 0; i < testPrice.length; i++)
{
// Search through string and append unfiltered values to returnString.
var c = testPrice.charAt(i);
if (c == "&")
{
if(i != 0)
{
SecondAmp = i;
}
}
}
var FirstPrice = testPrice.substring(6,SecondAmp);
var SecondPrice = testPrice.substring(SecondAmp + 5, SecondAmp + 7);
// create the fullprice
FullPrice = FirstPrice + "." + SecondPrice;
// we always send a constant product description, but this could easily be
var ProductDesc = "Affiliate Sale ";
ProductDesc = ProductDesc + "£" + FullPrice;
// then dynamically create an image which quietly sends off our info
document.write("<img src='http://www.assoctrac.com/5300/track/sale/?desc_1="
+ ProductDesc + "&price_1=" + FullPrice + "&qty_1=1&commit=1 '>"); </script>
cdicken
21-Jul-2004, 10:08 AM
Looking everywhere for the NETQUOTEVAR:SUBTOTAL in Act_Order04.html Doesn't seem to be in !
Can anyone help me find it, or let me know if the above code should be put elsewhere?Rather than NETQUOTEVAR:SUBTOTAL, try NETQUOTEVAR:FORMATTEDORDERTOTALCGI.
To then get this value to appear without shipping and tax, follow the instructions in this knowledge base article. (http://knowledge.actinic.com/users/kadmin/cgi-bin/ss000007.pl?PRODREF=826&NOLOGIN=1&ACTINIC_REFERRER=http://knowledge.actinic.com/users/kadmin/acatalog/)I would like to pass the product name in the order to my affiliate program... is this possible? This is not possible I'm afraid as it is not available via a single variable in the receipt.
magicant
26-Jul-2004, 04:44 PM
Hi,
Currently having two problems with integrating my actinic with Assoc Track.
1. The order number is not being transferred
2. Affiliate sales are not being tracked.
The main problem is No. 1.
I need to somehow transfer over: NETQUOTEVAR:THEORDERNUMBER into the javascript that is below:
I'm not entirely sure how to do this as I don't know javascript so if you could help that would be great. Surely I have to add a line like: OrderID = "NETQUOTEVAR:THEORDERNUMBER"; etc. The AssocTrac needs it to look like this later: the variable used with assoctrac is (order) so would be &order = orderNo etc
===========START JAVASCRIPT============
<script>testPrice = "NETQUOTEVAR:SUBTOTAL";
var i;
var SecondAmp = 0;
var FullPrice = "";
for (i = 0; i < testPrice.length; i++)
{
// Search through string and append unfiltered values to returnString.
var c = testPrice.charAt(i);
if (c == "&")
{
if(i != 0)
{
SecondAmp = i;
}
}
}
var FirstPrice = testPrice.substring(6,SecondAmp);
var SecondPrice = testPrice.substring(SecondAmp + 5, SecondAmp + 7);
// create the fullprice
FullPrice = FirstPrice + "." + SecondPrice;
// we always send a constant product description, but this could easily be
var ProductDesc = "Affiliate Transaction";
ProductDesc = ProductDesc + "£" + FullPrice;
// then dynamically create an image which quietly sends off our info
document.write("<img src='http://www.assoctrac.com/5300/track/sale/?desc_1="
+ ProductDesc + "&price_1=" + FullPrice + "&qty_1=1&commit=1 '>"); </script>
===========END JAVASCRIPT==============
Thank you for the help...
Best Regards
James Anthony
www.magicworld.co.uk
cdicken
27-Jul-2004, 10:11 AM
Are you definitely placing this code within Act_Order04.html?
magicant
27-Jul-2004, 11:14 AM
Yes, it is within order04.html now, and if you go through my order process at www.magicworld.co.uk and select "invoice and payment" you will see it in the source of the invoice page.
It is tracking sales, but because i'm not transferring across the order number, it seems to be creating it's own, and not just one order number per order!
The other problem is that it is not tracking the actual affiliate sales, just sales in general.
Can't wait to get this sorted
Thanks
Ant
cdicken
27-Jul-2004, 04:25 PM
Looking through your posts, it looks as if the variable needs to go in the code for the image...<img src="http://www.assoctrac.com/12345/track/sale/?
desc_1=printer;price_1=99.95;qty_1=1
desc_2=cartridge;price_2=19.95;qty_2=3;
order=NETQUOTEVAR:THEORDERNUMBER;commit=1">Does this help...?
magicant
20-Aug-2004, 10:06 PM
Afraid not, as it simply does not get converted into the order number... instead it remains as: NETQUOTEVAR:THEORDERNUMBER!!
Probably because we have not set the variable in the javascript... but i'm not a coder.
I'm at the end of my teather with this now... been trying for months.
I will post the integration e-mail from Assoc Trac who have been having many problems!
If you get any ideas, please could you E-mail Andrew Hoyer and give him an idea where he's going wrong, otherwise I'll just have to not use the software, which would be a great disappointment. His e-mails: andrew.hoyer@marketingtips.com
Thanks
============================
Andrew Hoyer
Posted on 20 Aug 2004 11:19 AM
--------------------------------------------------------------------------------
Hi James,
Okay I've made some edits to the order04.html page. Looks okay,
I just need to go about testing it.
Once I upload it, can I just go through the site and place an
order as a mail order or something, and see the display without
actually making a credit card purchase?
If that's the case, I will test it out and see what happens.
Let me know!
Thanks,
Andrew
Andrew Hoyer
Posted on 20 Aug 2004 01:06 PM
--------------------------------------------------------------------------------
Hi Anthony,
I finally go the order04.html page figured out, and made the modifications
I thought were necessary. However, I ran into two problems:
1) The page is built using XML includes, and each individual section
deals only with it's bit of data. You'll see one called Actinic:XMLTEMPLATE NAME="ProductLine" for example, and in that section,
the description and quantity are available, but not the price or
order number. Without all this information available together, it's
not possible to construct the image tag.
2) The second problem is that price returns a value like this:
£49.99 ($91.98)
This will not work as AssocTRAC requires simply a number with no other
characters.
I even looked at the code for os000001.pl, but am not even sure that
editing the main .pl file will allow access to the data altogether.
I'm not sure why the code was designed that way. It works great for
the cart and for displaying, but if you want to use all of the data
together at the same time, it's not available.
I discussed this with Joel, and we both think it's either not possible,
or would require a lot of modifications to the cart to resolve these
two issues.
The only possibility from here is to contact Actinic directly to find
out if anything can be done. Do you have a method of contacting them
for support?
Thanks,
Andrew
IMC TECH SUPPORT
stuartn
20-Aug-2004, 10:38 PM
Hi,
I have attached both the versions of order04.html we have used (one for v6 and one for v7) in text format. Please feel free to take out whatever you wish. They send assoctrac the relevant info no problem, although we got round the product name problem by simply sending one 'product' per order
eg.
if the customer bought item1 for £10, and item2 for £5, then we would send assoctrac the info as if the customer had simply bought one big item. So,
Description1=Affiliate Sale £15
Price1=£15
Quantity1=1
document.write("<img src='http://assoctrac.com/2.0/2649/sale.cgi?desc_1=" + ProductDesc + "&price_1=" + FullPrice + "&qty_1=1'>");
Then, at the bottom of the page we send over the Order number using the actinic netquotevar reference:
<DIV ALIGN="CENTER"> <img src="http://assoctrac.com/2.0/2649/sale.cgi?order=NETQUOTEVAR:THEORDERNUMBER&commit=1">
Cheers,
Stuart
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.