Integrating with Webgains
Many people would like to integrate their Actinic Installations with Affiliate Networks such as Webgains http://www.webgains.com; these networks are composed of a group of merchants and affiliates. Merchants join the network in order to have affiliates promote their products. Because of the structure of this network, merchants are able to promote their products throughout a broad spectrum, lowering their advertising costs. – these networks often require quite involved integration.
Webgains require data feeds which Mole-End offer as part of their wonderful Marketing Feed plug-in http://www.mole-end.biz/acatalog/Froogle_Mash.html .
Below is a step by step guide on how to integrate Webgains into Actinic. (Maybe others can provide step by step instructions for the other networks.)
Webgains Tracking Code
Integration is the process of setting up your system so that it sends Webgains system messages when users place orders at your site. This is achieved by adding a small amount of JavaScript to the order confirmation page of your web site. This code activates the request to Webgains system and allows them to decide if a commission is due to an affiliate for the current transaction.
Basic setup
The basic way to get your program up and running is to run in standard mode and not send Webgains details of items that make up the transaction. However, whilst the quickest in the short-term, this is not the recommended way to run your program; it will provide you with a lower quality of reporting and mean that you can’t set different commission levels for different products.
Step One
We need to build a order total variable that doesn’t include either shipping or tax (as you don’t want to pay commission on these) and to present it without formatting (i.e. 14000.67 rather than £14,000.67 or even worse £14,000/67). We also want to be able to get at the coupon code so that we can track offline coupons, as some affiliates use direct mail in the real world to advertise merchants sites.
1. In the site folder find OrderScript.pl
2. Right click and select Open With > Notepad
3. Find -
$::s_VariableTable{$::VARPREFIX.'ACTINICORDERTOTAL'} = $nTotal;
4. Add this code on the following line.
$::s_VariableTable{$::VARPREFIX.'NUMERICSUBTOTAL'} = (($nTotal-$nShipping)-$nTax1)/100;
#get at the coupon code
$::s_VariableTable{$::VARPREFIX.'AFILVOUCHERCODE'} = $::g_PaymentInfo{'COUPONCODE'};
You code should now look like the following:
Step Two
1. In Actinic Design View select “Reciept” from the “select page type” drop down
2. In the “Layout Code”
3. go to the bottom of the code just before </body>
4. Paste the following just before </body>
5. Change yourprogramnumber to the program number that Webgains have supplied you with. This can also be found on the Technical Setup of the Program Settings available from the left navigation under Program Setup in the left navigation of the merchant area of your Webgains account control panel.
6. Change standardcommissionid to the standard commission id that Webgains have supplied you with. This is also available from the “Commission Types” Choice under “Program Setup” in the left navigation of the merchant area of your Webgains account control panel.
Hit apply.
If you are happy to only have one commission level and aren’t that worried about full reporting you can upload (I normally do a refresh but I’m not sure if this is necessary). However for the extra features read on.
Many people would like to integrate their Actinic Installations with Affiliate Networks such as Webgains http://www.webgains.com; these networks are composed of a group of merchants and affiliates. Merchants join the network in order to have affiliates promote their products. Because of the structure of this network, merchants are able to promote their products throughout a broad spectrum, lowering their advertising costs. – these networks often require quite involved integration.
Webgains require data feeds which Mole-End offer as part of their wonderful Marketing Feed plug-in http://www.mole-end.biz/acatalog/Froogle_Mash.html .
Below is a step by step guide on how to integrate Webgains into Actinic. (Maybe others can provide step by step instructions for the other networks.)
Webgains Tracking Code
Integration is the process of setting up your system so that it sends Webgains system messages when users place orders at your site. This is achieved by adding a small amount of JavaScript to the order confirmation page of your web site. This code activates the request to Webgains system and allows them to decide if a commission is due to an affiliate for the current transaction.
Basic setup
The basic way to get your program up and running is to run in standard mode and not send Webgains details of items that make up the transaction. However, whilst the quickest in the short-term, this is not the recommended way to run your program; it will provide you with a lower quality of reporting and mean that you can’t set different commission levels for different products.
Step One
We need to build a order total variable that doesn’t include either shipping or tax (as you don’t want to pay commission on these) and to present it without formatting (i.e. 14000.67 rather than £14,000.67 or even worse £14,000/67). We also want to be able to get at the coupon code so that we can track offline coupons, as some affiliates use direct mail in the real world to advertise merchants sites.
1. In the site folder find OrderScript.pl
2. Right click and select Open With > Notepad
3. Find -
$::s_VariableTable{$::VARPREFIX.'ACTINICORDERTOTAL'} = $nTotal;
4. Add this code on the following line.
$::s_VariableTable{$::VARPREFIX.'NUMERICSUBTOTAL'} = (($nTotal-$nShipping)-$nTax1)/100;
#get at the coupon code
$::s_VariableTable{$::VARPREFIX.'AFILVOUCHERCODE'} = $::g_PaymentInfo{'COUPONCODE'};
You code should now look like the following:
Code:
# send the total as an integer in the currency base unit # e.g. "512834" # $::s_VariableTable{$::VARPREFIX.'ACTINICORDERTOTAL'} = $nTotal; $::s_VariableTable{$::VARPREFIX.'NUMERICSUBTOTAL'} = (($nTotal-$nShipping)-$nTax1)/100; #get at the coupon code $::s_VariableTable{$::VARPREFIX.'AFILVOUCHERCODE'} = $::g_PaymentInfo{'COUPONCODE'};
1. In Actinic Design View select “Reciept” from the “select page type” drop down
2. In the “Layout Code”
3. go to the bottom of the code just before </body>
4. Paste the following just before </body>
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e"> <!-- <webgains tracking code> --> <script language="javascript" type="text/javascript"> <!-- var wgOrderReference = "<actinic:variable name="TheOrderNumber" selectable="false" />"; var wgOrderValue = "NETQUOTEVAR:NUMERICSUBTOTAL"; var wgEventID = standardcommissionid; var wgComment = ""; var wgLang = "en_GB"; var wgsLang = "javascript-client"; var wgVersion = "1.2"; var wgProgramID = yourprogramnumber; var wgSubDomain = "track"; var wgCheckSum = ""; var wgVoucherCode = "NETQUOTEVAR:AFILVOUCHERCODE"; if(location.protocol.toLowerCase() == "https:") wgProtocol="https"; else wgProtocol = "http"; wgUri = wgProtocol + "://" + wgSubDomain + ".webgains.com/transaction.html" + "?wgver=" + wgVersion + "&wgprotocol=" + wgProtocol + "&wgsubdomain=" + wgSubDomain + "&wgslang=" + wgsLang + "&wglang=" + wgLang + "&wgprogramid=" + wgProgramID + "&wgeventid=" + wgEventID + "&wgvalue=" + wgOrderValue + "&wgchecksum=" + wgCheckSum + "&wgorderreference=" + wgOrderReference + "&wgcomment=" + escape(wgComment) + "&wglocation=" + escape(document.referrer); document.write('<sc'+'ript language="JavaScript" type="text/javascript" src="'+wgUri+'"></sc'+'ript>'); // --> </script> <noscript> <img src="http://track.webgains.com/transaction.html?wgver=1.2&wgprogramid=yourprogramnumber&wgrs=1&wgvalue=NETQUOTEVAR:NUMERICSUBTOTAL&wgeventid=standardcommissionid&wgorderreference=<actinic:variable name="TheOrderNumber" selectable="false" />" alt="" /> </noscript> <!-- </webgains tracking code> --> </actinic:block>
6. Change standardcommissionid to the standard commission id that Webgains have supplied you with. This is also available from the “Commission Types” Choice under “Program Setup” in the left navigation of the merchant area of your Webgains account control panel.
Hit apply.
If you are happy to only have one commission level and aren’t that worried about full reporting you can upload (I normally do a refresh but I’m not sure if this is necessary). However for the extra features read on.
Comment