WordPress Affiliate Manager

Affiliates Management Plugin for WordPress

  • Home
  • Features
    • Screen Shots
  • Download
  • Documentation
  • Addons
  • Support
    • Support Forum
    • Forum Login
    • Forum Registration
    • Contact
    • Premium Addon/Plugin Support

[Resolved] Correct WP Hook Code to Track a Landing Page

by

WordPress Affiliate Manager › Forums › Affiliate Manager Plugin › Correct WP Hook Code to Track a Landing Page

Tagged: code, Hook

  • This topic has 3 replies, 2 voices, and was last updated 6 years, 2 months ago by Shadow Labs.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 30, 2019 at 1:31 pm #4603
    insaka
    Participant

    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!

    May 1, 2019 at 4:12 am #4605
    Shadow Labs
    Keymaster

    @insaka, This code needs to be in a PHP file. Are you using it as HTML?

    May 2, 2019 at 7:19 am #4609
    insaka
    Participant

    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/

    May 3, 2019 at 5:09 am #4616
    Shadow Labs
    Keymaster

    @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).

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Featured Addons

  • WooCommerce Coupon Tracking
  • WooCommerce Product Specific Commission

Copyright © 2025 | WordPress Affiliate Manager | Privacy Policy