- Posts: 261
- Thank you received: 5
How are affiliate clicks recorded?
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 2.5
Hi,
I set up an affiliate program and have a few afiliate partners showing my banners on their website.
I also use an app that monitors traffic on my website (Extrawatch Pro). Using this app I see visitors coming from the partner websites. The app even mentions the affiliate Partner ID. So the banners work OK. They send visitors to my website.
BUT....
When I look in Hikashop/affiliates/Clicks I do not see clicks recorded.
So now I am puzzled: Is something going wrong here? Did I set set it up wrong? Are affiliate clicks recorded by Hikashop?
Can somebody explain?
Thanks
Sjaak
Please Log in or Create an account to join the conversation.
You should see the clicks there. We do see them on our end (on our website for example).
Maybe there is a bug ?
If you turn on the "error reporting" and "debug mode" options of the Joomla configuration and that you click on an affiliate link, to you get an error ?
Please Log in or Create an account to join the conversation.
I followed your advise. Debug mode 'ON'. Error reporting 'ON'. On the website of one affiliate partner I clicked a banner.
No error shown. My website opened OK. No Click was recorded by Hikashop. Extrawatch mentions a visitor (with my IPaddress) coming from the partners website mentioning their affiliate ID.
Do I need to look somewhere else for the error?
Sjaak
Please Log in or Create an account to join the conversation.
Ok. I see only two possibilities in that case. Either the MySQL is failing or the partner_id in the URL is not for a valid partner (not activated, account deleted for that id)
Could you provide the MySQL queries traces at the bottom of that page that you see with the debug turned on ?
Please Log in or Create an account to join the conversation.
I do not get an SQLquery at the bottom of the page with debug on.
The Affiliate partner indeed appears to have more than one user accounts. So I checked: The affiliate ID is the same as the Hikashop customer ID. That is correct right?
The affiliate account is set to active.
I have set the most recent joomla user account 'enabled' and active in joomla. It's the one that fits the data as shown in the affiliate account.
Should the joomla user ID be the same as the hikashop customer ID?
Thanks
Sjaak
Please Log in or Create an account to join the conversation.
You should definitely get the queries at the bottom of the pages with the debug mode of the Joomla configuration on.
www.inmotionhosting.com/support/edu/joom...ettings/debug-system
If you don't, then this would indicate that your joomla template is coded to not display the debug data.
The fact that the joomla user id and the hikashop user id are different is normal, but the partner id and the hikashop user id should be the same.
How about to look at the clicks listing of the backend with the debug mode turned on ? Maybe the error is during the display of the listing and not during the saving of the click.
Please Log in or Create an account to join the conversation.
I tried your last suggestion but that did not give me any new information. With debug mode on I neither get error messages.
Sjaak
Please Log in or Create an account to join the conversation.
Ok. Then what if you temporarily change your frontend template to the default one of Joomla, make sure that the debug plugin of Joomla is activated and try again the procedure ? That way, you should get the queries debug at the bottom.
Please Log in or Create an account to join the conversation.
Well it's on now and at the bottom of the page I see ' Joomla! debug console'. It has 4 sections. Session, Profile information, Memory usage and Database Queries.
I assume you need the last?
Sjaak
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I activated the debug plugin. Then I visited the webpage of one of my partners. I clicked my banner. Was redirected to my website. Guess what....no debug infromation at the botom of the page. I get debug information on all my pages except when I cilck an affiliate banner. Strange he?
In the backend I went to the affiliateclicks page of hkashop. At least there I could get some debug info. I don't know if that is what you need.
Thanks for helping me.
Sjaak
Copy/paste of debug info:
Please Log in or Create an account to join the conversation.
I have some plans to expand the affiliate program. But first I need to have it working properly.
Any new insights on this one?
Sjaak
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The clicks are recorded by the system plugin "hikashopaffiliate".
In the trigger "onAfterRoute", the plugin read the parameter "partner_id" (or another parameter depending of the configuration of the hikashopaffiliate plugin, you can rename it if you want).
If the partner id value point to an existing partner, the plugin will continue his process and at the end of the function you can see that a "click" object is stored in the database.
If the click is not stored, it could be because the user is not found or the "user_partner_activated" is not set.
The best at this moment will be to add some debug data in the plugin in order to understand the process.
You might use the "$app->enqueueMessage('....');" in order to display information in the plugin and get some information about the process.
Hope it will help.
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.
Please Log in or Create an account to join the conversation.
Please tell me where to find the "onAfterRoute" trigger. Screenshot attached.
And I do not know how to use "$app->enqueueMessage('....');"
user is activated IserID is correct.
Best regards,
Sjaak
Please Log in or Create an account to join the conversation.
It is in the source code of the plugin.
It requires some full debug in the plugin in order to understand why the plugin is not called and the click is not stored in the database.
Because, it is possible that something else in your website block the hikashop affiliate plugin to work correctly.
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.
Please Log in or Create an account to join the conversation.
Some time passed since I posted my question and now it seems something has to be done in the sourcecode.... :dry: .....mmmh
How can this be solved?
Best regards
Sjaak
Please Log in or Create an account to join the conversation.
Well, some credentials will be required if you want us to make some debug in your website.
A backend access to check your configuration, see the affiliates, their clicks and see the other system plugins in place in your website.
A ftp access to edit the hikashop affiliate plugin directly and add some debug data into.
You can send such private information using private message.
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.
Please Log in or Create an account to join the conversation.
I sent you a PM.
Thanks in advance
Sjaak
Please Log in or Create an account to join the conversation.
Thanks for the access but you send me only the backend one, not the FTP.
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.
Please Log in or Create an account to join the conversation.