Přejít k obsahu  Přejít k hlavnímu menu

Blog / Knowledge base

Updated: 27. October 2020

Draw a random discount code

Do you need to draw a random win or a code to gamble popup? Mailocator allows you to easily set the probability to one hundredth of a percent, randomly select a win and deliver it to the email tool.

When to use the winning code draw?

When you wish to select and display a random code or a random win.
In gamification tools, where the amount of winnings is not determined in advance by another methodology.


In Scenarios, select the campaign in which you want to use the draw.
Click on the gift code icon and select Random code based on given probability rate.
-* Click Manage to continue.






In the code manager, create the required number of sets for the winning codes.
In the Probability in % column, specify the probability of winning for a given group of codes.

The mechanism of daily and unique codes, or codes from the API, can be applied.
Valid probability range is from 0.001 to 99.999%.
If the sum of the probabilities does not reach 100%, you will be notified.
If the sum of probabilities does not reach 100%, the draw will take place in the interval of the sum of probabilities.




How to pass discount codes to the email tool?

By default, Mailocator sends discount codes in the field promocode
But if you need to change the property name, it's easy:

Simply add this mask to the HTML code of the hidden input to the value attribute: {{PROMO_CODE}}
<input type="hidden" name="opt_wincode" value="{{PROMO_CODE}}">

Use a mask to pass the name / text information listed next to the code: {{PROMO_CODE_TEXT}}
<input type="hidden" name="opt_wincode_name" value="{{PROMO_CODE_TEXT}}">





Functionality verification



Verification of the correctly allocated win can be monitored in the monitoring.
The process of awarding the prize can be found in PROMO_CODE_RAND.




You will verify the detail of the evaluation of the prize draw in detail.

RELATED

Launch a campaign when you hover or touch a specific location on the page

Mark a location that triggers a campaign when the user hovers over it or touches it on a touch device

Mailocator Events

With events, you can intelligently manage the sequence of campaigns across the entire workflow scenario and display much more relevant and precisely targeted content in real time.

Notification

Set up the display of notifications on your site using Mailocator

Processing of the form (campaign) inserted into the page

How to send data to Mailocator from a form located on your site?

Instructions for your own design of the wheel of fortune

How to create a wheel of fortune with your own HTML and CSS code