Share Image

Adding a coupon to your website

Posted on Categories Content Creation, Guides

Adding a coupon to your website

Coupons are a great way of raising sales, particularly when combined with a ‘limited time only’ message. However you can run into problems when visitors try to use coupons that have expired, or pass them on to their friends to use. Bunting can help you avoid these problems with its *|COUPON|…|* function. This function takes your coupon and disguises it. It creates a unique replacement coupon code that your visitors see, and hides your original. When the visitor then enters their replacement coupon, Bunting checks to ensure the coupon is in-date, and is being entered by the visitor who it was given to. Providing everything checks out, Bunting then privately swaps the replacement coupon with your original, real coupon, for your site to process.

There are three parameters that can be passed to the coupon function. The first is mandatory, while the second and third are optional. Any parameters you pass must be seperated by|pipe|symbols. See below:

*|COUPON|* Tag

Parameter Description Example
1) your coupon Your coupon code, known by your website, for Bunting to disguise. *|COUPON|money-off-10|*
2) segment reliant? Optional. This accepts two parameters – ‘yes’ and ‘no’ (any other value, including omitting this parameter, will be treated as ‘no’). All *|COUPON|*s are created within an action, which in turn belongs to a visitor segment. If this value is set to ‘yes’ then the visitor segment must apply for the coupon to work. If ‘no’ then the coupon will always work, even if the visitor segment that created it no longer applies. For example, you may create a visitor segment that sends a visitor an email after 10 days absense from your site, containing a coupon to entice them back. The moment they return back their number of days absense from your site will thus change to zero, and the segment that created the coupon (within the email) will no longer apply to the visitor. In this circumstance you would want to set the value to ‘no’, or leave the parameter empty. In another circumstance however you may want to offer a discount to visitors, only if the value of their cart is more than a certain value. You would set up a visitor segment with, say, a lightbox to be displayed only if the visitor’s cart value is over XX. However if the visitor then removes items from their cart, the segment would no longer apply to that visitor, and you would want the coupon to no longer apply either. In this case you would set the second parameter of the coupon function to ‘yes’, so that the coupon is only valid if the segment it is contained within is valid also. Coupon that is only valid if the visitor it was given to is still part of the segment that created it: *|COUPON|money-off-10|yes|*

Coupons that are always valid even if the visitor it was given to is no longer part of the segment that created it: *|COUPON|money-off-10|no|*
-or-
*|COUPON|money-off-10|*

3) end time Optional. The lifespan of the coupon (when it will expiry). If the coupon function is inserted into an action that also contains a countdown timer, then the expiry will automatically be set to coincide with the expiry of the timer. If the action doesn’t contain a timer, or you want to override this default expiry then you can do so by entering your own expiry period value as the third end time parameter:
1) A numerical value between 1 and 8765 represents the end time in hours from the time the coupon fuction is first executed. 8765 is the number of hours in one year, thus one year is the maximum of this type. This end time starts relative to when each visitor us given it. If visitor A is given their coupon 10 minutes before visitor B, then their coupon will also expire 10 minutes earlier.
2) A Unix Timestamp; a 10-digit number that can be used to identify any time to a precise second. Say you wanted all coupon to expire at a specific date and time (such as mid-night on New Year’s Eve) you would use a timestamp. This website will let you easily create a timestamp to your needs.
3) The word ‘Midnight’ means the coupon will expire at midnight of the day it is given.
Coupon expires in 48 hours: *|COUPON|money-off-10|no|48|*

Coupon expires on Christmas Day 2013: *|COUPON|money-off-10|no|1387987623|*

Coupon expires at Midnight: *|COUPON|money-off-10|no|MIDNIGHT|*

Help Request

Can't find the answer to your question?

Contact Us