Adding a coupon to your website

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|*

How priority affects visitor segments

How priority affects visitor segments

Many actions in Bunting, such as lightboxes, header bars and website exit confirmation messages, are single instance actions. This means that two of the same type of action cannot load in one page view by a visitor.

For example; Say you have defined two visitor segments. One activates a lightbox containing an promotional message, the other activates a lightbox containing a feedback form. If a visitor matches the criteria of both visitor segment conditions then Bunting will have to choose between which lightbox to load, as it cannot show both in the same page view. This is where segment priorities come in.

Visitor segment actions are prioritised in the order that their parent segments appear on the Behavioral Targeting list. So, if a confliction should occur, the lightbox within a segment appearing at the top of the list will be displayed, rather than any other lightbox within a segment lower on that list.

You can easily rearrange the list of priorities with the ‘Raise’ and ‘Lower’ links on the Visitor Segments list.

Adding a Countdown timer to enhance time sensitive offers

Adding a countdown timer to enhance time-sensitive offers

Time sensitive offers are one of the most powerful ways to give your sales messages impact. They increase urgency and promote greater impulse purchasing.

Adding a countdown timer to your website would normally be tricky job for a programmer. However Bunting makes it easy for anyone to do it. Whether in a lightbox or as part of a targeted banner, countdown timers can be added anywhere on your website. The syntax to add a countdown timer is as follows:

*|TIMER|end time|expiry message|skin|key|*

There are four parameters that can be passed to the timer. The first is mandatory, while the second, third and fourth are optional. However you can complete all four parameters for good practise. Any parameters you pass must be seperated by|pipe|characters. See below:

*|TIMER|* Parameters

Parameter Description Example
1) end time The value which the timer is counting down to. A numerical value between 1 and 8765 represents a countdown in hours from the time the visitor first sees the timer. 8765 is the number of hours in one year, thus one year is the maximum timer of this type. This timer starts relative to when each visitor sees it. If visitor A first sees the timer 10 minutes before visitor B, then they will also see the timer reach completion 10 minutes earlier. To synchronise two timers together, see parameter 4 – key – below.

Any numerical value above 8765 represents a Unix Timestamp. A Unix Timestamp is a 10-digit number that can be used to identify any time to a precise second. Say you wanted all visitors to see the same countdown to 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.

Any other value entered will set the timer to countdown towards midnight of the day it is loaded. Once midnight is reached the timer will automatically reset and start counting down to the next midnight. We recommend you enter the value Midnight to help your code remain easily identifiable.

Countdown 48 hours: *|TIMER|48|*

Countdown to Christmas Day 2013: *|TIMER|1387987623|*

Countdown to Midnight: *|TIMER|MIDNIGHT|*

2) expiry message A message that will be presented to visitors when the countdown timer reaches zero. This can contain HTML. Alternatively, enter “HALT_ACTION“, and the action containing this timer will no longer be displayed to the visitor. For example, a lightbox showing a countdown to New Year’s Eve will no longer show when it gets to New Year’s day. Stops the containing action loading when timer expires: *|TIMER|24|HALT_ACTION|*
3) skin Bunting timers come pre-loaded with a skin (visual design), available in small (S), medium (M), large (L), or extra large (XL). This parameter allows you to define which sized skin you want. Alternatively you can turn the skin off (OFF) and add your own CSS styling (see section below). If omitted the timer will use the medium sized skin (M).

This parameter is irrelevant when the *|TIMER|* is being placed in a Header Bar action. Timers within Header Bars appear as simple text, such as “3 hours and 25 minutes”.

Extra large countdown timer: *|TIMER|24||XL|*

Unskinned timer: *|TIMER|24||OFF|*

4) key This is only relevant to timers where the end time (first parameter, above) is set between 1 and 8765. Keys are a way of syncronising two or more timers. Say you have a 72 hour timer that begins counting down when executed in a lightbox. You may then want to show a second, separate timer with its time syncronised to that of the first timer, also counting down from 72. To do this you give the two timers the same key parameter. If you don’t pass a key then all timers with end time values between 1 and 8765 will count down separately from the time they were first individually loaded. Two syncronised timers: *|TIMER|24||XL|timer1|*

*|TIMER|24||S|timer1|*

Example timers

Extra large timer, 6 hours go to.

*|TIMER|6|Time’s Up!|XL|*

: :
Unstyled timer, Midnight tonight

*|TIMER|midnight||OFF|*

: :
Medium sized timer, New Year’s Day 2015

*|TIMER|1420070400||M|*

: : :
Days Hours Mins Secs
Small timer, now expired

*|TIMER|1262304000|You shouldn’t see a timer here…|S|*

You shouldn’t see a timer here…


Styling a timer yourself

You can easily style a timer yourself with CSS. First, make sure that the third timer parameter – skin – is set to “OFF”. This will remove Bunting’s default skin. You can then add CSS to your own website’s stylesheet to style the timer to however you want it appear. Timer HTML generated by Bunting looks like that below:

<table class="bunting_timer" remaining_seconds="96621839">
	<tbody>
		<tr>
			<td class="bunting_timer-days">02</td>
			<td><span class="bunting_timer_number bunting_timer_number-colon">:</span></td>
			<td class="bunting_timer-hours">07</td>
			<td><span class="bunting_timer_number bunting_timer_number-colon">:</span></td>
			<td class="bunting_timer-minutes">52</td>
			<td><span class="bunting_timer_number bunting_timer_number-colon">:</span></td>
			<td class="bunting_timer-seconds">12</td>
		</tr>
	</tbody>
	<tfoot>
		<tr>
			<td>Days</td>
			<td></td>
			<td>Hours</td>
			<td></td>
			<td>Mins</td>
			<td></td>
			<td>Secs</td>
		</tr>
	</tfoot>
</table>

The ‘days’ countdown, and <tfoot> section with the time annotations of days, hours, minutes and seconds, only appears on timers that are counting down from greater than 24 hours.

Positioning a timer

Skinned or not, all Bunting timers are enclosed in a HTML <table> without a CSS ‘position:’ attribute. Unless your website has generic rule for positioning HTML tables, Bunting timers will normally appear on a new line, separated from text above and below. However, you can enter CSS onto your website, or into each Bunting action, to accurately position timers. This is normally done by entering something like:

TABLE.bunting_timer {
	position:absolute;
	top:50px;
	left:150px;
}

The latter CSS declaration will position the timer 50 pixels from the top of the containing positioned element, and 150 pixels from it’s left position.

Guide to Merge Tag Conditional Statements

Conditional statements allow you to easily implement basic logic into your behavioural targeting actions and webpage widgets. This will allow you to harness greater control over what appears to your website’s visitors.

Let’s say you have a lightbox, an email, or a banner, that will appear to a certain group of visitors. You may want to personalise that lightbox by including the name of each visitor at the top. To do this you would use a replacement tag, like so:

Hello *|FORENAME|*, here’s a special offer for you…

However, on many occasions there many not be any data to replace the tag with. In the latter example, a visitor may trigger the action without their name being known. In this case, the latter line would appear to that visitor as:

Hello , here’s a special offer for you…

To prevent this from happening you can use replacement tag conditional statements. The syntax is as follows:


*|IF|value1|*value2*|ELSE|*value3*|ENDIF|*

Conditional statements consist of three commands, two mandatory and one optional. They are:

  1. *|IF||* – mandatory. Begins the conditional statement. The value between the quote marks (value1) is the replacement value you are testing.
  2. *|ELSE|* – optional. Separates the two values, value2 and value3. value2 is the text / HTML to show if the replacement value is known. value3 is the text / HTML to show if the replacement value is not known. If the *|ELSE|* command is omitted then nothing will be shown at all if the replacement tag in *|IF|* is not known.
  3. *|ENDIF|* – mandatory. Ends the conditional statement.

Returning to the original example, the following line would show the visitor “Hello Joe” if the visitor’s name is Joe, or “Hello stranger” if the visitor’s name is unknown:

Hello *|IF|*|FORENAME|*|**|FORENAME|**|ELSE|*stranger*|ENDIF|*, here’s a special offer for you…

The two values can be as long or as short as you want. They can also contain HTML. The following will hide or show an email entry box, depending on whether the visitors’ email address is known or not:


*|IF|*|EMAIL|*|*<style type=”text/css”>#email_box { display:none; }</style>|*ELSE*|Your email address is unknown.<br />Please enter it below:*|ENDIF|*

You enter as many conditional statements as you want per action or widget, but you cannot embed conditional statements within one another. The three commands are case sensitive, and must be entered exactly how they appear above in uppercase letters.

Replacement tag conditional statements give you the freedom to easily implement basic logic into your website personalisation actions, so give them a try!

Adding a Countdown Timer to an Email

Adding a Countdown Timer to An Email

When creating behavioural targeting emails you can add a countdown timer to add urgency. To do this, amend the field ‘Countdown’ with one of the following values:

  1. A numerical value between 1 and 8765 represents a countdown in hours from the time the email is sent. 8765 is the number of hours in one year, thus one year is the maximum timer of this type. This timer starts relative to when each email is sent.
  2. Any numerical value above 8765 represents a Unix Timestamp. A Unix Timestamp is a 10-digit number that can be used to identify any time to a precise second. Say you wanted all recipients to see the same countdown to 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‘ will set the countdown to midnight of the day it is loaded.

Guide to segment conditions

You can segment your visitors in a multitude of ways, to target specific actions to a specific audience. You create a segment comprising of one or more segment conditions. These are explained below.


Browsing Related Metrics

Current URL

Identify visitors by the page they are currently on. Matches the URL after your domain name: http://www.yourdomain.com/about-us.html. For example, to make a lightbox appear on your about page (where the page address is /pages/about.php) you could enter:

+

OR

+
Duration of current visit (secs)

Segment visitors by the duration of their current visit. Value is in seconds. For example, to select anyone who has been on your website for more than half an hour you would enter:

+
Favourite Brand

Only target visitors whose favourite brand meets your criteria. For example:

+
Favourite Category

Only target visitors whose favourite category meets your criteria. For example:

+
Is on purchase complete ‘thank you’ page

This identified people who are on (or not on) the page of your website that immediately follows a successful completed purchase. This page normally thanks the visitor for their custom.

Page views this visit

Target visitors who have viewed a certain number of pages on any given current visit. Every time the visitor leaves your website and returns, this number is reset to zero. For example:

+
Time since last page view (mins)

This identifies visitors who have already left your website, by the amount of time it has been since they were last on it. For example, if you wanted to send a email to anyone who has left more than half an hour ago you would enter:

+
Total visits

Visitors will often make several return visits to your website, while making a decision on what they wish to buy. All visitors have a minimum of one visit to your website. With this condition you can segment visitors by the number of visits they have made. For example, to target only first time visitors you could enter:

+

If you wanted to target return visitors, on the other hand, you could enter:

+
Typed data (eg: into search box)

Whenever a visitor enters something onto your website via a form (for example, via a search box, a contact form, or the checkout) the data is recorded against that visitor\’s account. You can set a rule to select only visitors who have entered only certain text on your site at some point during their browsing history. So, for example, to highlight only people who have searched for the term “Nike Shoes” you could enter:

+

Or any search term containing “Nike” by entering:

+
Visit began with an advert click

Segment visitor by whether their current arrival to your website was via one of your PPC adverts or not. To select all visitors who arrived from an organic source, you would enter:

+
Visitor Tag

Segment visitor by associated visitor tag. For more information on visitor tags click here. To select all visitors who have been tagged \’magazine_ad\’, you would enter:

+

Characteristic Metrics

Click fraud suspect

Only target visitors who are or are not a click fraud suspect. This is useful to present deterrents to suspects, in order to reduce your PPC spend. Alternatively you could select only legitimate visits to see your promotions, so that known fraud suspects (who may potentially be your competitors) will not.

Country code

Segment visitors by their country of origin. This is useful to present offers only relevant to certain countries. For example, you could identify your own country to see an offer advertising free delivery:

+

Whereas foreign visitors would see a different message promoting worldwide delivery:

+
Current IP address

Segment visitors by their current email address while browsing your website. Identify visitor by a range by using the ‘contains’ comparison. For example:

+
Current screen height (px)

Segmenting visitor by their screen size means you can easily identify visitor on a mobile device (low screen resolution), or a desktop computer (high screen resolution). This is useful for presenting the correct platform-optimised content to the right visitors, or promoting platform specific messages (eg: “Download our Smartphone App!”)

Current screen width (px)

Target visitors by the width of their screen. See ‘Current screen height (px)’, above.

Have visitor email address

Target visitors whose email addresses are either known or unknown. For example, you could display an email capture form only to visitors who’s email address is unknown, by entering:

+
Have visitor forename

Same as ‘Have visitor email address’ (above), except this segments visitors by whether their forename is or is not known.


General metrics

Day of the week is (text)

Have day-of-the-week related offers, such as offers that only appear on weekends, or only on a Wednesday. A weekday only offer would look like this:

+
– AND –
+
Match all visitors

If match all visitors is set to equal YES then everyone (except control group visitors) will be matched.

+

Order related metrics

Bought product name

Segment visitors by the products they have purchased. For example, target messages towards all visitors who have, at some point, purchased a Nike product, you could enter:

+

Please note that this only searches the name of products bought. So the latter example would only work if all of your product names contained the word ‘Nike’.

Product in cart name

Segment visitors by the products they currently have in their shopping cart. For example, to show an promotion only to visitors who have a Nike product in their shopping cart you could enter:

+

Please note that this only searches the name of products in the cart. So the latter example would only work if all of your product names contained the word ‘Nike’.

Days since last order

Segment visitors by the number of days it has been since they last placed an order on your website. For example, to show a time-sensitive offer to people who have placed an order from you less than a month ago, you would enter:

+
Total items in cart

Target visitors by whether they have products in their shopping cart or not. For example, to target people with a full basket you could enter:

+
Total order value

Target only visitors who have spent over (or less) than a certain amount during their customer lifetime. This is great for rewarding loyal and/or high spending visitors with discounts and further incentives to purchase. Eg:

+
Total orders

Target only visitors who have placed a specified number of orders. For example, to target non-customer you could enter:

+

For first time customers you could enter:

+

Whereas loyal return customers you could enter:

+
Value of cart

Target visitors by the value of their shopping cart. You could, for example, send your sales staff an alert email whenever there is a visitor on your site with over a certain amount in their basket, when their contact details are known:

+
Value of current product

This is only relevant to visitors who are actively viewing a product. If the product they are viewing is over a certain value then you could show a piece of promotional material or any other message of your choice.

Getting a dynamic value from your website

Getting a dynamic value from your website

There are times when you may wish to include dynamic content that your website recognises into Bunting actions. Examples include time-sensitive discount codes, unique for every visitor, within banners, lightboxes and cart abandonment emails. To do that you can insert GET calls.

GET call syntax

The syntax you enter into an action, to perform a GET call to your server, is as follows:

*|GET|web address|alternate content|cache expiry|*

The first parameter – web address – is mandatory. This is the address of a script, typically located on your website, that will generate a value such as a discount code, save it to your website’s database, and output that value via HTTP for Bunting to collect. The output from your website must be isolated purely to the value you want Bunting to give to your visitors. Do not include HTML of any kind, unless this too is intended for your customers. If the value is sensitive (such as a money-off discount code) then we recommend you protect the page by including a query string such as ‘password’ for your system to validate. For example:

http://www.your-website.com/discount_code_generator.php?password=7hSDjd63j

The second parameter – alternate content – is optional. This is alternative content that will appear to your customers should your server be unreachable. In the latter example you may want to enter a generic discount code, so that if your server cannot be reached to provide the customer with a unique discount code, then that generic discount code will instead be provided. If your server cannot be reached and you choose not to include any alternate content then the GET call code will simply be removed, and your customers will see nothing.

The third parameter – cache expiry – is also optional. When a GET call is performed the value returned from your script (located at the web address you entered) is cached within Bunting. This markedly improves loading speeds for your customers’ benefits, and reduces processing on your server. During the cache lifespan your server is not called and the cached value is used instead. Expiry of a GET call cache doesn’t mean that the value will no longer be displayed to the visitor, it simply means that Bunting will again contact your server for the value (a slower process), then re-cache the result. In 90% of cases you won’t need to pass a value for this third parameter. If you don’t then the cache lifespan is set as the default 30 days, unless the GET call is inserted into an action that also contains a countdown timer, in which case the cache expiry will automatically be set to coincide with the expiry of the timer. Although it’s unlikely you’ll need to, you can override the default cache expiry behaviour by entering your own expiry period value as the third cache expiry parameter:
1) A numerical value between 1 and 8765 represents the expiry in hours from the time the GET call is first performed. 8765 is the number of hours in one year, thus one year is the maximum of this type. This expiry starts relative to when each visitor sees it. If visitor A first sees the GET call 10 minutes before visitor B, then their cache 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 GET call cached values 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 cache will expire at midnight of the day it is called.

Important syntax notes: All three parameters must be separated by|pipe|symbols|. The word GET must be in capital letters. If a second and/or third parameters are added then the two or three parameters must be separated by commas with no spaces. All three parameters must be surrounded by brackets.

Returned values can only be 250 characters, or less. Values generated by your server greater than 250 characters in length (including any HTML characters) will be cropped to just 250 characters.

You can only include one GET call per Bunting action.

Examples

Say you wanted to add a unique discount code for each visitor, with a fallback value of ‘10-OFF‘ should your server not respond, your GET call may look something like this:

*|GET|http://www.your-website.com/discount_code_generator.php?password=7hSDjd63j|10-OFF|*

For the same call, without a fallback value, your GET call may look something like:

*|http://www.your-website.com/discount_code_generator.php?password=7hSDjd63j|*

For the first call, with a cache lifespan of 4 hours (meaning, your server is not called for another 4 hours from the time the first GET call is performed per visitor, your GET call may look something like:

*|GET|http://www.your-website.com/discount_code_generator.php?password=7hSDjd63j|10-OFF|4|*

The visitor_id and action_id URL Parameters

For every web address you enter in a GET call, Bunting appends two URL parameters of ‘visitor_id‘ and ‘action_id‘. The visitor_id parameter contains the ID number of the profile in Bunting that is associated with the visitor who has triggered the GET call. For example, the command:

*|GET|http://www.your-website.com/discount_code_generator.php?password=7hSDjd63j|*
would actually call the following address on your server:
http://www.your-website.com/discount_code_generator.php?password=7hSDjd63j&visitor_id=12345&action_id=9876
when the parent action is triggered by a visitor to which Bunting has assigned ID number ‘12345’

Whereas with a visitor with the ID number ‘456’ :
*|GET|http://www.your-website.com/password_generator.php|*
would call:
http://www.your-website.com/password_generator.php?visitor_id=456&action_id=9876

The action_id parameter is the numerical reference of the action in Bunting that is calling your server (such as a lightbox, a header bar, an email, etc).

Your website’s response script could ignore both these values, or optionally choose to use and save them in order to remember which values it has already generated and for who. You could, for example, use the values to ensure uniform behavior; so that every visitor only receives the same code that is unique to them, rather than being given a new code every time they trigger the action containing the GET call. This, however, isn’t relevant if the third cache expiry parameter is set to cover the lifespan of the discount code.

Cache values relative to visitors

Cached CALL values are made uniquely for every visitor who triggers an action containing a GET call. For example; two GET calls made within the cache lifespan for two visitors, will call your server twice and cache both those values. On the other hand, three calls made within the cache lifespan for just two visitors will call your server only twice, caching both values, and recalling a previously cached value once.