Can I pass affiliate codes to iHost and have it record them?
Question:
Q: Can I pass affiliate codes to iHost and have it record them?
Answer:
Yes, you can pass an affiliate code to iHost in the affid
query variable, such as:
http://www.example.com/order/?affid=AFFILIATE_CODE_HERE
Or you can pass an affiliate code to iHost in a cookie named affid
.
When iHost creates an account and an affiliate code has been set, it will store the
code in the affid
column of the accounts
database table. When it creates an
account package, it will store the code in the affid
column of the accounts_packages
table.
Note that iHost will not actually do anything with the affiliate code other than store it; this feature exists simply to allow third-party developers to write custom scripts which correlate affiliate codes to actual orders.
Question:
Q: Can I change the name of the cookie or request variable used for the affiliate code?
Answer:
Yes. Edit conf/conf.inc.php
and add a line as follows:
define('AFFILIATE_KEY','affid');
Replace affid
with the name of the cookie or request variable you'd like iHost to store.