Skip to main content

Click API

Click API provides a non-redirect lander integration way, you can load lander according to your campaign rules without any redirection.

note

Click API only works for simple campaign and flow campaign.

How to use

  1. Get your api key

    Login your maxconv account, get your api key at: Settings -> Security -> API Keys

  2. Download index.php from campaign links:

    click-api.png

  3. Open downloaded php file, modify the config area:

    // --- config area start--- //
    $apiKey='Your API Key Here';

    $campaignUrl='Your Campaign Link Here';
    // --- config area end --- //

    with your information, remove any query paramater in campaign url, it should looks like https://demode.mcgo2.com/visit/6c3e9664-d5ac-4170-95dd-8a81c85c4603

  4. Init api and load appropriate lander

    Use the code below to init the class and load lander that matched the flow rule.

    //init
    $maxconv = new MaxConvClickAPI($campaignUrl, $apiKey);

    //load lander
    $maxconv->loadLander();
  5. Add offer urls to lander

    Get offer url with method $maxconv->getOfferUrl(), this url is the offer url, so visitor will directly go to offer link. You can also use {OFFER_URL} in your lander, click api will replace it with offer url.

    Get lander click url with method $maxconv->getLPClickUrl(), this url is the will be url like https://your-domain/click, visitor will go to your tracking domain, then to the offer url. You can also use {LANDER_CLICK_URL} in your lander, click api will replace it with lander click url.

    Get lander click report url with method $maxconv->getLPClickReportUrl(), this url can be used to track a click event when you want visitor directly go to the offer, and track their clicks. You can also use {LANDER_CLICK_REPORT_URL} in your lander, click api will replace it with lander click report url.

Examples

Send visitors directly to offer, and track click

index.php:

<?php

// --- config area start--- //
$apiKey='Your API kEY Here';
$campaignUrl='Your Campaign Url Here';
// --- config area end --- //

//init
$maxconv = new MaxConvClickAPI($campaignUrl, $apiKey);

//load lander
$maxconv->loadLander();

/**
* This file is MaxConv Click API.
*
* (c) MaxConv <support@maxconv.com>
*
* For the full documentation and support, please visit https://maxconv.com
*/
class MaxConvClickAPI
{
//api codes...
}

lander.html:

<a 
href="{OFFER_URL}"
onclick="navigator.sendBeacon('{LANDER_CLICK_REPORT_URL}');"
target="_blank"
>Get Offer</a>

Redirect visitors to offer so you can hide referrer

index.php:

<?php

// --- config area start--- //
$apiKey='Your API kEY Here';
$campaignUrl='Your Campaign Url Here';
// --- config area end --- //

//init
$maxconv = new MaxConvClickAPI($campaignUrl, $apiKey);

//load lander
$maxconv->loadLander();

/**
* This file is MaxConv Click API.
*
* (c) MaxConv <support@maxconv.com>
*
* For the full documentation and support, please visit https://maxconv.com
*/
class MaxConvClickAPI
{
//api codes...
}

lander.html:

<a href="{LANDER_CLICK_URL}">Get Offer</a>

API Functions

Function nameDescription
loadLander()Display appropriate lander according to flow rules
getClickData()Return current click data in array format, including country, browser...etc
getOfferUrl()Return offer url
getLPClickUrl()Return click url, which looks like http://domain.com/click, will be redirect to offer when clicked
getLPClickReportUrl()Return a url that can be used to report a click event