Tracking affilliate-based purchases

  • Posts: 3
  • Thank you received: 0
11 years 2 months ago #122836

-- HikaShop version -- : 2.1.3
-- Joomla version -- : 2.5.11
-- PHP version -- : 5.3.19
-- Browser(s) name and version -- : Chrome


I am looking to check purchases associated with an Affiliate using the hikashop database and I have found that even though I have many affiliates (partners) setup in Hikashop and the Affiliate program is capturing click counts it is not doing a good job of capturing sales by affiliates. My questions with this are:

1. Does the affiliate program use cookies or just a session in the database to track sales? My main question here is if a person doesn't buy when they use the affiliate link but then returns later to my site and buys - does this purchase get attributed to the affiliate?

2. When I look into the database I see that the user_partner_id is 0 for all the users in the xxx_hikashop_user table. Is there something wrong with my setup?

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #122929

Hi,

1. Both. Cookie for guest and we store the partner if the guest creates an account.

2. I think that's because you didn't create the account with a partner link.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: drives

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
11 years 2 months ago #122981

Thanks for answering my question Jerome. I have a couple more questions to clarify your answer.

1. Is there any way to make this process automated on the website. So that when a user "registers" through the checkout process that the partner_id is automatically put in to that user's record?

2. Is there a way to get the partner_id from a user's cookie for other actions - such as when they fill out an RSForms form?

3. How long does the cookie last?

Thanks,
Matt

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #123122

Hi,

1. It is already the case.

we store the partner if the guest creates an account.


2. You can retreive the partner id using this code:
$partner_id = hikashop_decode(JRequest::getCmd('hikashop_affiliate',0,'cookie'),'partner');

3. You can configure this value with the option "Validity period of a click for leads and sales"; by default it's 30 days.
www.hikashop.com/support/documentation/5...l#features_affiliate

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 11 years 2 months ago by Jerome.
The following user(s) said Thank You: drives

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
11 years 2 months ago #123157

Thanks for that Jerome, this solves my problem. Although it still doesn't explain why the partner_id is 0 for all our customers who went on to purchase after clicking on an affiliate link? But I should be able to solve this with the code you gave me.

Thanks, :)
Matt

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #123162

Hi,

You can take a look at the system plugin "hikashopaffiliate".
You will see that the there is a trigger for "onAfterStoreUser" which set the partner id.
There are some conditions to validate the affiliation during the registration.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: drives

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum