- This topic has 3 replies, 2 voices, and was last updated 6 years, 2 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Affiliates Management Plugin for WordPress
by
WordPress Affiliate Manager › Forums › Affiliate Manager Plugin › Correct WP Hook Code to Track a Landing Page
Hi,
I am trying to place code onto a wordpress page to track commission which will be paid for visits via an affiliate link.
I’m not a developer but I found this code below on the WPAM support documentation. I’ve placed this code onto the page but it’s not registering as a conversion for the affiliate. Does the code need to be changed slightly?
$args = array();
$args[‘txn_id’] = ‘4JX55705JA6177943’;//TODO
$args[‘amount’] = ‘49.95’;//TODO
$args[‘aff_id’] = ‘1’;//TODO
do_action(‘wpam_process_affiliate_commission’, $args);
FYI – Here’s the link to the support doc: https://wpaffiliatemanager.com/api-track-commission-via-a-wordpress-hook/
Thanks in advance!
@insaka, This code needs to be in a PHP file. Are you using it as HTML?
Thanks for the reply. I’m using the Divi theme which has a code widget where I can insert code. I’m not sure of the difference. I’ve included the code at the bottom of this page https://insaka.co.za/yos-subs-success/
@insaka, Thanks. This is not going to work. You need to use it right after your e-commerce plugin has processed a sale on your site (so you can reward a commission to your affiliate for referring the customer).