Testing API Offer
Testing API Offer
After creating and configuring an API offer in the Marksel system, it must be tested. There are several options for running an offer:
Our system can provide a default landing page that you can use if needed. In this case, you should contact support to request the landing page. Once added to your system, you can apply it to your offer.
If you plan to use your own landing pages, you must add the following script to them:
<script type="text/javascript" src="https://domain.com/static-js/land_script.js"> </script>
Replace domain.com – with your platform’s domain (as configured in our system).
Note: The script must be placed at the very bottom of the landing page's HTML markup (this is the standard location for scripts in HTML).
Requirements for the Landing Page Form
To ensure the correct operation of our script, the following requirements must be met for the form structure and its elements on the landing page.
1. Form Structure
The landing page must include a form with the <form> tag.
Example:
<form> <!-- Form elements --> </form>
2. Submit Button
The form must contain a button with the type="submit" attribute:
<button type="submit">Submit</button>
Important:
Do not modify the default behavior of the submit button. Our script uses addEventListener to handle the form submission event. Altering this behavior may cause the script to malfunction.
3. Required Fields
The form must include a mandatory input with the name="email" attribute:
<input name="email" />
Requirement:
The name attribute must be exactly email. Variations like user_email will not work, as our script will not be able to retrieve data from such fields.
4. Optional Fields
The landing page may include optional fields:
<input name="age" />
<input name="gender" />
Details:
The name attributes must be exactly age and gender (matching the specified values).
For the gender field, acceptable values are: Male, Female, Ladyboy.
These fields are optional, as partners may not include them in their targeting settings.
5. Date of Birth Fields (if applicable)
If the user’s date of birth is collected via three separate selectors (day, month, year), they must have the following name attributes:
<select name="birthDay"> </select>
<select name="birthMonth"> </select>
<select name="birthYear"> </select>
Requirement:
The name attributes must be exactly birthDay, birthMonth, and birthYear for proper data collection.
6. General Guidelines
All name attributes must match those specified in this documentation to ensure our script can process the data correctly.
Avoid adding custom event handlers that might interfere with the logic of our script.
After adding the script, send one of your landing pages to support for verification. If everything is set up correctly, it will be approved for use, and you can add it to the Landings section in our system for future offers.
You can integrate through the backend. The documentation is available at:
https://domain.com/swagger
Replace domain.com – with your platform’s domain (as configured in our system).
For this method, follow these steps:
Add the script (as described in custom landing section).
In Marksel, assign an affiliate to the offer and generate an API Key for them.
Use the following link format:
domain.com/?offer={AFF_APIKEY}&email={mail}
Note: {AFF_APIKEY} refers to the API Key generated in the offer.
After setting up the offer and adding products to the system, you must perform testing:
Create an API offer and configure it.
In the Flow tab, select a product, fill in the required parameters, and assign an affiliate.
If using a script and a verified landing page, link the landing and generate a tracking link.
Keep only one Active product (the one being tested). Set all others to Not Active during the test.
Open the landing page using the generated tracking link, fill out the form, and click Submit.
If the system redirects to the advertiser, the setup is correct.
Check Statistics (Statistic → API → User Session) to see if a user session has been created.
If the session is created successfully (status: Success), open it, find the Lead History (ID), and pass it to the advertiser.
Note: The Lead History (ID) will appear when clicking the arrow next to the email in Statistic → User Session.
You can also use the Test Tool:
Go to the offer page and click the Test button (bottom left).
Alternatively, access it from the Settings tab.
Provide the advertiser with the Postback URL so they can confirm conversions. You can view the information for postback formation here.
The advertiser must verify the lead in their system and send a postback.
If the conversion appears in our statistics, the test is successful, and traffic can be launched.
Important:
Use a tracking-configured domain for postbacks.
The goal in the postback must match the one set in the offer.