Landing page campaigns

Connect an external landing page to an Appfront campaign
Sometimes it can be very worthwhile to trigger a gift from an external source. For example, if a customer fills out a survey, on the last page, it would be nice to lead the customer to a page where they can leave their details, and this would trigger a gift in their account.
This can be done with the Appfront landing page campaigns.
There are a few steps that need to be done in order to create a landing page campaign:
1. Creating the campaign in the Appfront dashboard by choosing Campaign Trigger: Landing Page Campaign Sign Up. You can choose any promotion for this campaign (coupon, points etc.). Once the campaign was created (after you saved it), you will be able to get the campaign ID from the URL:
2. Create a new group on the Appfront portal. Important- The group name must not contain a space! For example- Newcustomers.
3. Create a web page (any page in your website) which contains a form with the following fields: * Phone number and Email - these fields should be text fields available for the customer to fill. * Group name and Campaign ID (policyId) - copy them from the Appfront portal. * Name: the name of your business, all lower case with no spaces.
You may provide the details to the person who builds the landing page for further review:
$(function() {
$('form').submit(function(e) {
var $form = $(this);
var wrap = $form.closest('div.w-form');
var done = wrap.find('> .w-form-done');
var fail = wrap.find('> .w-form-fail');
$.ajax({ type: 'POST',
dataType: 'json',
data: $form.serialize(),
success: function(responseData, textStatus, XMLHttpRequest) {
if (responseData.errCode) {
if (responseData.errCode == 2) {
fail.find('div').text('Sorry, you can\'t sign up twice');
} else {
window.location.href = "http://[EDIT HERE]"; //link to app/online ordering refresh
error: function(responseData, textStatus, XMLHttpRequest) {
// Show fail div