Manuelle Integration mit einem Affiliate-System

Grundlegende Integration

Most affiliate systems will provide you with a tracking code that you can insert on a thank you page or confirmation page. Since this page is only displayed to the customer following a purchase, including the tracking code here means that you’re only tracking commissions when a sale has occurred. In MemberMouse you can Bestätigungsseiten zu erstellen, die auf das gekaufte Produkt zugeschnitten sind. Hier würden Sie Ihren Tracking-Code einfügen.

Die Tracking-Codes sind von System zu System unterschiedlich, aber sie sehen in der Regel so aus:

<img border="0" src="http://www.youraffiliatesystem.com/sale.php? affiliate_id=[ MM_Order_Data name='affiliateId' ]& order_total=[ MM_Order_Data name='total' ]& order_number=[ MM_Order_Data name='id' ]& ip_address=[ MM_Order_Data name='ipAddress' ]" width="1" height="1">

Sie müssen lediglich MemberMouse SmartTags™ verwenden, um die entsprechenden Daten an den Tracking-Code zu übergeben, wie oben gezeigt. Lesen Sie diesen Artikel, um eine vollständige Liste der mit dem SmartTag Order_Data verfügbaren Auftragsdaten erhalten.

Anmerkung:  When you use this approach you won’t be able to take advantage of commission profiles or partner payouts. This is because you’re manually tracking a commission on the confirmation page so you’re bypassing the place where MemberMouse determines whether to track the commission based on Provisionsprofil und Partnerauszahlungskonfigurationen.

Erweiterte Integration

Sie können Provisionsprofile erstellen und Partnerauszahlungen definieren in MemberMouse that allow you to configure when you want to track commissions. In order to take advantage of these configurations, you’ll need to let MemberMouse inform you when to make a call to your affiliate system to track a commission. You can accomplish this by listening for affiliate push notifications or creating functions that respond to affiliate WordPress hooks.

Push-Benachrichtigungen für Partner

One way to ensure you’re only tracking commissions in accordance with commission profiles and partner payout configurations is to put all of the code required to inform your affiliate system in scripts that are called by the MemberMouse push notification system. Read this article to lernen, wie man ein benutzerdefiniertes Skript aufruft, wenn Partner-Ereignisse auftreten.

Affiliate WordPress-Haken

Another way to ensure that you’re only tracking commissions in accordance with commission profiles and partner payout configurations is to put all of the code required to inform your affiliate system in functions that are tied to affiliate WordPress hooks. Below is an example of how you could attach a function to the mm_commission_initial hook. Read this article to mehr über die Verwendung von WordPress-Hooks für Partner erfahren.

add_action('mm_commission_initial', 'track_commission');
function track_commission($data)
{
    $orderNumber = $data["order_number"];
    $orderTotal = $data["order_total"];
    $orderAffiliateId = $data["order_affiliate_id"];
    $orderIPAddress = $data["order_ip_address"];

    // access coupons associated with the order
    $couponCode = "";
    $coupons = json_decode(stripslashes($data["order_coupons"]));
    foreach($coupons as $coupon)
    {
        $couponCode = $coupon->code;
        break;
    }
    
    // generate URL to track commission
    $url = "http://www.youraffiliatesystem.com/sale.php?";
    $url .= "affiliate_id={$orderAffiliateId}&";
    $url .= "order_total={$orderTotal}&";
    $url .= "order_number={$orderNumber}&";
    $url .= "coupon_code={$couponCode}&";
    $url .= "ip_address={$orderIPAddress}";

    // call URL using cURL
    $request = curl_init($url);
    curl_exec($request);
}
War dieser Artikel hilfreich?

Verwandte Artikel

Sie können die gesuchte Antwort nicht finden?

Wenden Sie sich an unser Customer Success Team
Kontaktieren Sie uns!