the Fatwa Department Research Committee - chaired by Sheikh `Abd al-Wahhâb al-Turayrî
You may generally take the gifts that are given to customers upon making a purchase or taking out a contract.
There are only two problem cases. One is where a free gift is promised upon purchase but its identity is unknown. The other case is where the gift is not guaranteed but awarded as a prize to certain "lucky" customers.
Where the identity of the gift is certain and its receipt upon purchase is guaranteed, then it can be construed as part of the purchase or contractual arrangement. It poses no problem whatsoever. This is usually the case with such gifts.
However sometimes, this is not the case. There are cases where receipt of the gift is not guaranteed, like in a raffle that a purchaser is automatically entered into.
There are other cases where a gift is guaranteed upon purchase, but where the specific identity of the gift is uncertain. This is the case with a promised "surprise gift".
In both of these cases, it is only lawful for the purchaser to take the gift if his or her decision to make the purchase in not influenced in any way by the free gift. In this case, the purchaser can receive the gift, since he or she would have entered into the purchase in any case.
However, if the purchaser makes a purchase or enters a contract and is partly or fully motivated in doing so by the chance to receive the uncertain or unidentified gift, then this would be a contract or sale based on uncertainty (gharar) and would consequently be unlawful.
And Allah knows best.
Source: Islam Today