Splio allows you to dynamically generate a barcode within your emails and landing pages.
Barcodes can be generated from:
- Database fields and custom fields, using variables
- Coupon codes, using the coupon variable
Supported barcodes formats:
Generating the barcode
The barcode is generated when the script URL is being called.
In this URL, the type and value of the barcode have to be entered.
Here's an example of a barcode : « code 128 ».
The URL contains 2 parameters to generate the barcode:
Click the URL below to see an example in your browser:
Generating EAN-13 barcode dynamically
If the barcode is a dynamic value, you shall edit the URL as shown below (the ean13 recalls each time a different value from the custom field $Barcode$:
Generating a barcode from a database field
If you have a code stored in a database field, use the field variable to dynamically input the code in the URL.
The same applies if you have a code type in database:
Generating a barcode for a coupon
You can also generate a barcode using a coupon code, if your coupons' codes are in a supported format.
Adding the barcode to your email design
To dynamically add the barcode image in your email designs, simply add the barcode URL in an image tag.
/!\ WARNINGS /!\
Dynamic Barcode Value
Since a barcode width is depending directly on its main value, we strongly discourage the use of fixed sizes for the barcode image. It could result in an unwanted transformation, and make it unreadable.
Our barcode generator creates the codes on a white background, to ease its readability on scanners. Therefore, the background color is generated by default, and cannot be altered.
alt attribute can be filled in with the code's value, to globally help its overall usability.
Splio allows you to dynamically generate a QR code within your emails and landing pages.
QR code Url and parameters
Because the QR code can return anything from text to URL, there is only one parameter:
data. You can include anything you like.
To include an URL to the QR Code, write
Generating a QR code from a database field
The same way you would for a barcode, you can insert dynamic content to the QR Code, by inserting a variable.
For instance, you could redirect a contact to your website, directly on their favorite brand's page, if the field is present in database:
Generating the QR Code in an HTML Email
To have the image generated directly in your email, you can use the URL directly in the source of the image, as such:
<img style="width:70px;" src="http://www.splio4.com/barcode/qrcode.pl?data=http%3A%2F%2Fmywebsite.com%2F$favorite_brand$">
QR Code image size
The example above shows a QR code of 70px wide. Consider the number of characters your QR Code must render, as the more there are characters, the more details (rows and columns) it will have, and the required scanning distance and size will vary.
Examples of QR code containing an URL:
|Type||URL (unencoded)||QR Code||QR Code image URL|
|Google Maps URL||https://www.google.fr/maps/place/103+Boulevard+Haussmann,+75008+Parisfirstname.lastname@example.org,2.315308,17z/data=!3m1!4b1!4m2!3m1!1s0x47e66fc98404ef03:0xd5c0c4fd77b8e7de||
/!\ Using accents, extended characters or URL
When including special characters or and URL, characters and spaces must be encoded, except for Splio's variables.
For instance, to have the QR code redirect to
http://mywebsite.com, the URL will have to be encoded as such:
With a variable, the url will look as such:
You can use an URL encoder such as this one to encode your URLs and special characters.