Full-service Internet Marketing & Web Development
Recent Posts

Featured Posts
|
How to: Add a Lead Opt-in Web FormAdrian Singer, October 28 |
A lead opt-in web form is a short form, asking the user to provide name, emailaddress, phone and/or other optional fields, for the purpose of signing up for a program, or receiving more information about your offering.

Unlike other shopping carts, the SPI cart doesn't limit you to a single form style or any specific fields.
You can create whatever html form you like, using any design and combination of fields (text, radio button, checkboxes, textareas) as needed.
The only requirement is to have at least the emailaddress field, whenever saving a new lead to the database.
Step 1 - Design your opt-in form
Use your favorite HTML editor to design your lead opt-in form.
For simplicity, use 'name' as the fieldname for the user's name (or 'first_name' + 'last_name'), use 'emailaddress' as the fieldname for the user's email address and use 'phone' as the fieldname for the user's phone number.
Here's a typical lead opt-in form with the basic name,emailaddress,phone fields as well as a few additional custom ones:
<form action="#" method="post">
<p>First Name: <input type="text" name="first_name" /></p>
<p>Last Name: <input type="text" name="last_name" /></p>
<p>Best Email: <input type="text" name="email" /></p>
<p>Best Phone Number: <input type="text" name="phone" /></p>
<p>Have you traded individual stocks?
Yes <input name="traded_indi_stock" type="radio" value="Yes" /> No <input name="traded_indi_stock" type="radio" value="No" />
</p>
<p>Have you traded options
Yes <input name="traded_option" type="radio" value="Yes" /> No <input name="traded_option" type="radio" value="No" />
</p>
<input type="submit" name="submit" value="Submit" />
</form>
Step 2 - Add custom fields to Leads table
Since we're using a few custom fields in this example (traded_indi_stock, traded_option), we need to add those fields to the 'leads' table.
Connect to your SPI database using PHPMyAdmin, locate the leads table and add the two new fields. You only have to do this once every time you're adding a new custom field to a table.

Make sure you're adding the custom fields to the 'leads' table and pay close attention to the fieldnames. The fieldnames you choose are going to have to match the fieldnames you pass to the do_addlead() function.
Step 3 - Save the lead to the database
Now that we have the custom leads in the 'leads' table, saving the lead to the database is the easy part.
The code below renders the opt-in form, saves the lead to the database and redirects the user to a thankyou.html page.
<?php
// Include SPICart shopping cart API
require_once("spicart.php");
// If this is a lead submit
if (!empty($_POST['email']))
{
// Save lead to the database
$input = array();
$input['first_name'] = $_POST['first_name'];
$input['last_name'] = $_POST['last_name'];
$input['emailaddress'] = $_POST['emailaddres'];
$input['phone'] = $_POST['phone'];
$input['traded_indi_stock'] = $_POST['traded_indi_stock'];
$input['traded_option'] = $_POST['traded_option'];
do_addlead($input, &$output, &$result_str);
Header("Location: thankyou.html");
die;
}
?>
<form action="#" method="post">
<p>First Name: <input type="text" name="first_name" /></p>
<p>Last Name: <input type="text" name="last_name" /></p>
<p>Best Email: <input type="text" name="emailaddress" /></p>
<p>Best Phone Number: <input type="text" name="phone" /></p>
<p>Have you traded individual stocks?
Yes <input name="traded_indi_stock" type="radio" value="Yes" /> No <input name="traded_indi_stock" type="radio" value="No" />
</p>
<p>Have you traded options
Yes <input name="traded_option" type="radio" value="Yes" /> No <input name="traded_option" type="radio" value="No" />
</p>
<input type="submit" name="submit" value="Submit" />
</form>
Note about Affiliate Tracking
Often times, affiliates will be sending their traffic to your lead opt-in forms. You're going to want to know which affiliate generated which leads.
Luckily the system takes care of this automatically.
One of the fields in the 'leads' table is aff_id. This is the ID of the referring affiliate and serves as the glue, associating leads with the affiliates who referred them.
When a user clicks on an affiliate link to visit the opt-in form on your website, they typically follow a link that looks like this:
www.YourDomain.com/?aff_id=1234
Where 1234 is the affiliate ID.
As soon as the user lands on the lead opt-in form, the spicart.php include at the top of your file, identifies the aff_id url-parameter and saves it in a cookie on the end-user's machine.
Later when you call do_addlead(), this method picks up the aff_id from the end-user's cookie and passes it along, so that when the lead is added, the referring aff_id is saved as well.

Unlike other shopping carts, the SPI cart doesn't limit you to a single form style or any specific fields.
You can create whatever html form you like, using any design and combination of fields (text, radio button, checkboxes, textareas) as needed.
The only requirement is to have at least the emailaddress field, whenever saving a new lead to the database.
Step 1 - Design your opt-in form
Use your favorite HTML editor to design your lead opt-in form.
For simplicity, use 'name' as the fieldname for the user's name (or 'first_name' + 'last_name'), use 'emailaddress' as the fieldname for the user's email address and use 'phone' as the fieldname for the user's phone number.
Here's a typical lead opt-in form with the basic name,emailaddress,phone fields as well as a few additional custom ones:
<form action="#" method="post">
<p>First Name: <input type="text" name="first_name" /></p>
<p>Last Name: <input type="text" name="last_name" /></p>
<p>Best Email: <input type="text" name="email" /></p>
<p>Best Phone Number: <input type="text" name="phone" /></p>
<p>Have you traded individual stocks?
Yes <input name="traded_indi_stock" type="radio" value="Yes" /> No <input name="traded_indi_stock" type="radio" value="No" />
</p>
<p>Have you traded options
Yes <input name="traded_option" type="radio" value="Yes" /> No <input name="traded_option" type="radio" value="No" />
</p>
<input type="submit" name="submit" value="Submit" />
</form>
Step 2 - Add custom fields to Leads table
Since we're using a few custom fields in this example (traded_indi_stock, traded_option), we need to add those fields to the 'leads' table.
Connect to your SPI database using PHPMyAdmin, locate the leads table and add the two new fields. You only have to do this once every time you're adding a new custom field to a table.

Make sure you're adding the custom fields to the 'leads' table and pay close attention to the fieldnames. The fieldnames you choose are going to have to match the fieldnames you pass to the do_addlead() function.
Step 3 - Save the lead to the database
Now that we have the custom leads in the 'leads' table, saving the lead to the database is the easy part.
The code below renders the opt-in form, saves the lead to the database and redirects the user to a thankyou.html page.
<?php
// Include SPICart shopping cart API
require_once("spicart.php");
// If this is a lead submit
if (!empty($_POST['email']))
{
// Save lead to the database
$input = array();
$input['first_name'] = $_POST['first_name'];
$input['last_name'] = $_POST['last_name'];
$input['emailaddress'] = $_POST['emailaddres'];
$input['phone'] = $_POST['phone'];
$input['traded_indi_stock'] = $_POST['traded_indi_stock'];
$input['traded_option'] = $_POST['traded_option'];
do_addlead($input, &$output, &$result_str);
Header("Location: thankyou.html");
die;
}
?>
<form action="#" method="post">
<p>First Name: <input type="text" name="first_name" /></p>
<p>Last Name: <input type="text" name="last_name" /></p>
<p>Best Email: <input type="text" name="emailaddress" /></p>
<p>Best Phone Number: <input type="text" name="phone" /></p>
<p>Have you traded individual stocks?
Yes <input name="traded_indi_stock" type="radio" value="Yes" /> No <input name="traded_indi_stock" type="radio" value="No" />
</p>
<p>Have you traded options
Yes <input name="traded_option" type="radio" value="Yes" /> No <input name="traded_option" type="radio" value="No" />
</p>
<input type="submit" name="submit" value="Submit" />
</form>
Note about Affiliate Tracking
Often times, affiliates will be sending their traffic to your lead opt-in forms. You're going to want to know which affiliate generated which leads.
Luckily the system takes care of this automatically.
One of the fields in the 'leads' table is aff_id. This is the ID of the referring affiliate and serves as the glue, associating leads with the affiliates who referred them.
When a user clicks on an affiliate link to visit the opt-in form on your website, they typically follow a link that looks like this:
www.YourDomain.com/?aff_id=1234
Where 1234 is the affiliate ID.
As soon as the user lands on the lead opt-in form, the spicart.php include at the top of your file, identifies the aff_id url-parameter and saves it in a cookie on the end-user's machine.
Later when you call do_addlead(), this method picks up the aff_id from the end-user's cookie and passes it along, so that when the lead is added, the referring aff_id is saved as well.
|
Mailing Lists and SegmentsMike Peters, July 10 |
SPI Email Marketing system supports two types of destination lists:
* Static Mailing List
Add an unlimited number of custom fields, import lists from your machine or a remote server.
The number of recipients on these type of lists always stays the same, until people unsubscribe or you import new records.
See this short video for a walk-through of how to import emails to a list.
* List Segment
A list segment is a powerful filter on your entire database. It's a database SQL rule, that allows you to create tightly focused groups of customers, leads or affiliates.
For example, you can create a segment of "All customers whose payment got declined over the last 7 days", or "All customers residing in New York who purchased Product X" etc.

-
Your SPI account manager will create several popular list segments in your account: All customers, All affiliates, All leads etc.
You can add as many segments as you need. Use list segments wisely to tailor specific messages to targeted groups of customers.
List segments are updated several times every day, applying the SQL-rule on your entire database, to filter-in the records that belong to each segment.
Sending email broadcasts
Once your mailing lists and segments are defined, sending out a broadcast is a breeze.
Simply click 'Send Broadcast', type-up your message and select the target list or lists.


The system will automatically de-dup, so that no recipient ever receives the same message more than once.
A note about Autoresponders
Every autoresponder you create under the Autoresponder service, will automatically create a list-segment in the Email Marketing service:

This way, you can broadcast messages on-demand, to all subscribers of an individual autoresponder.
* Static Mailing List
Add an unlimited number of custom fields, import lists from your machine or a remote server.
The number of recipients on these type of lists always stays the same, until people unsubscribe or you import new records.
See this short video for a walk-through of how to import emails to a list.
* List Segment
A list segment is a powerful filter on your entire database. It's a database SQL rule, that allows you to create tightly focused groups of customers, leads or affiliates.
For example, you can create a segment of "All customers whose payment got declined over the last 7 days", or "All customers residing in New York who purchased Product X" etc.

-
Your SPI account manager will create several popular list segments in your account: All customers, All affiliates, All leads etc.
You can add as many segments as you need. Use list segments wisely to tailor specific messages to targeted groups of customers.
List segments are updated several times every day, applying the SQL-rule on your entire database, to filter-in the records that belong to each segment.
Sending email broadcasts
Once your mailing lists and segments are defined, sending out a broadcast is a breeze.
Simply click 'Send Broadcast', type-up your message and select the target list or lists.


The system will automatically de-dup, so that no recipient ever receives the same message more than once.
A note about Autoresponders
Every autoresponder you create under the Autoresponder service, will automatically create a list-segment in the Email Marketing service:

This way, you can broadcast messages on-demand, to all subscribers of an individual autoresponder.
|
Affiliate System Commission Plans setupMike Peters, July 9 |
The SPI Affiliate System supports two types of commission plans:
Product Commission Plan
Pay affiliate X per every sale of the designated product
Affiliate Commission Plan
Pay affiliate X per every product sale that doesn't have its own specific commission plan assigned to it
-
You can think of it as the 'Affiliate Commission Plan' being the default pay, while the 'Product Commission Plan' allows applying specific rules to individual products.
For example, let's say you'd like to pay a certain affiliate 30% on all the sales they generate, except for the "Red Widgets" product where you have lower margin. On that product, you want the affiliate to be paid 10%.
You would create two commission plans: a 10% one and a 30% one.
Assign the 30% commission plan to the affiliate:

And assign the 10% commission plan to the individual product:

The affiliate will be credited as soon as the referred customer is charged.
Once you define commission plans, you can associate the same commission plans to multiple affiliates / products.
-
Now let's go over all the options you have when setting up a new commission plan:

You can define different rules for the 'First Payment' vs 'Recurring orders'.
In the example above we're paying affiliates 20% on all sales plus a flat $5.00 fee and the same rules apply for recurring payments.
We're also paying $2 per every lead generated.
The 'Keep Paying until' section, allows you to control whether you'd like to keep paying affiliates for the life-cycle of the customer, or limit the number of pay cycles.
The 'Override' flag is useful when you have an affiliate where you'd like them to be paid a certain amount/percentage, regardless of any product-defined commission plans. This is typically used with partners.
Product Commission Plan
Pay affiliate X per every sale of the designated product
Affiliate Commission Plan
Pay affiliate X per every product sale that doesn't have its own specific commission plan assigned to it
-
You can think of it as the 'Affiliate Commission Plan' being the default pay, while the 'Product Commission Plan' allows applying specific rules to individual products.
For example, let's say you'd like to pay a certain affiliate 30% on all the sales they generate, except for the "Red Widgets" product where you have lower margin. On that product, you want the affiliate to be paid 10%.
You would create two commission plans: a 10% one and a 30% one.
Assign the 30% commission plan to the affiliate:

And assign the 10% commission plan to the individual product:

The affiliate will be credited as soon as the referred customer is charged.
Once you define commission plans, you can associate the same commission plans to multiple affiliates / products.
-
Now let's go over all the options you have when setting up a new commission plan:

You can define different rules for the 'First Payment' vs 'Recurring orders'.
In the example above we're paying affiliates 20% on all sales plus a flat $5.00 fee and the same rules apply for recurring payments.
We're also paying $2 per every lead generated.
The 'Keep Paying until' section, allows you to control whether you'd like to keep paying affiliates for the life-cycle of the customer, or limit the number of pay cycles.
The 'Override' flag is useful when you have an affiliate where you'd like them to be paid a certain amount/percentage, regardless of any product-defined commission plans. This is typically used with partners.
|
Email Marketing Tracking DomainMike Peters, July 9 |
Whenever you send an email broadcast / autoresponder or system-message with SPI, your emails are delivered via dedicated ip-addresses.
As part of our ongoing effort to optimize delivery rates, in addition to using dedicated ip addresses, we also dynamically update all the links in your email messages to use a custom tracking domain.

For example, the following email message:
will be converted to -
All links in the message body are automatically replaced with the tracking-domain, so that your message contains outgoing links to a single domain, which we manage the email-reputation for.
You can use your main website domain-name for tracking, or you can register a new generic domain.
To setup your own tracking domain, use one of two options:
Redirecting an entire domain
Setup your domain to redirect to spilnk.com, or point it to this IP address: 174.36.170.90
Using a sub-folder under your primary website domain
Create a new directory under your website and call it 'r' (short for redirect)
Place this index.php file under that directory:
$url = substr($REQUEST_URI,2);
Header("Location: http://spilnk.com$url");
Now update your web server config file, to redirect all 404's under /r to index.php
If you're using NGinx, this setup will do the trick:
server {
listen 1.2.3.4:80;
server_name www.mydomain.com *.mydomain.com;
# set regular docroot
location /
{
root /home/mydomain.com/htdocs/;
index index.php index.html index.htm;
error_page 404 = /index.php;
}
location ~* .(php)$
{
fastcgi_intercept_errors on;
error_page 404 = /r/index.php;
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/mydomain.com/htdocs/$fastcgi_script_name;
include /etc/nginx/fastcgi_top.conf;
fastcgi_param DOCUMENT_ROOT /home/mydomain.com/htdocs/;
include /etc/nginx/fastcgi_bottom.conf;
}
location /r
{
root /home/mydomain.com/htdocs/r/;
index index.php;
error_page 404 = /index.php;
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/mydomain.com/htdocs/r/index.php;
include /etc/nginx/fastcgi_top.conf;
fastcgi_param DOCUMENT_ROOT /home/mydomain.com/htdocs/;
include /etc/nginx/fastcgi_bottom.conf;
}
}
As part of our ongoing effort to optimize delivery rates, in addition to using dedicated ip addresses, we also dynamically update all the links in your email messages to use a custom tracking domain.

For example, the following email message:
Quote:
|
Hi {%firstname%}, Please visit www.somedomain.com for more information about our program. Sincerely, John Doe, Company Name www.mywebsite.com |
will be converted to -
Quote:
|
Hi {%firstname%}, Please visit www.spilnk.com/CODE1 for more information about our program. Sincerely, John Doe, Company Name www.spilnk.com/CODE2 |
All links in the message body are automatically replaced with the tracking-domain, so that your message contains outgoing links to a single domain, which we manage the email-reputation for.
You can use your main website domain-name for tracking, or you can register a new generic domain.
To setup your own tracking domain, use one of two options:
Redirecting an entire domain
Setup your domain to redirect to spilnk.com, or point it to this IP address: 174.36.170.90
Using a sub-folder under your primary website domain
Create a new directory under your website and call it 'r' (short for redirect)
Place this index.php file under that directory:
$url = substr($REQUEST_URI,2);
Header("Location: http://spilnk.com$url");
Now update your web server config file, to redirect all 404's under /r to index.php
If you're using NGinx, this setup will do the trick:
server {
listen 1.2.3.4:80;
server_name www.mydomain.com *.mydomain.com;
# set regular docroot
location /
{
root /home/mydomain.com/htdocs/;
index index.php index.html index.htm;
error_page 404 = /index.php;
}
location ~* .(php)$
{
fastcgi_intercept_errors on;
error_page 404 = /r/index.php;
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/mydomain.com/htdocs/$fastcgi_script_name;
include /etc/nginx/fastcgi_top.conf;
fastcgi_param DOCUMENT_ROOT /home/mydomain.com/htdocs/;
include /etc/nginx/fastcgi_bottom.conf;
}
location /r
{
root /home/mydomain.com/htdocs/r/;
index index.php;
error_page 404 = /index.php;
fastcgi_pass backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/mydomain.com/htdocs/r/index.php;
include /etc/nginx/fastcgi_top.conf;
fastcgi_param DOCUMENT_ROOT /home/mydomain.com/htdocs/;
include /etc/nginx/fastcgi_bottom.conf;
}
}
|
SPI EmailDesk UpdatesDawn Rossi, July 6 |
SPI EmailDesk is a full fledged email help desk solution, featuring:
* Full look&feel customization
* Web-based or email-driven (no need to login to reply to tickets)
* Auto-reply
* Canned responses
* FAQ / Knowledge base
* Escalation
* Email aliases
* Full attachments support via Amazon S3
* Smart message-content parsing
* Multi-lingual support
* API for third-party integration

This weekend we've incorporated a few changes to this service:
* Support for messages of unlimited length
* Message-body templates, and
* Better handling of unicode characters.
If you notice anything out of the ordinary, or have any questions, please contact us.
* Full look&feel customization
* Web-based or email-driven (no need to login to reply to tickets)
* Auto-reply
* Canned responses
* FAQ / Knowledge base
* Escalation
* Email aliases
* Full attachments support via Amazon S3
* Smart message-content parsing
* Multi-lingual support
* API for third-party integration

This weekend we've incorporated a few changes to this service:
* Support for messages of unlimited length
* Message-body templates, and
* Better handling of unicode characters.
If you notice anything out of the ordinary, or have any questions, please contact us.
|
How to Add a New Order under a CustomerAdrian Singer, June 23 |
In a previous post, I explained How to Edit Order details, updating the shipping-address, price, credit-card or product for an existing order.
Today, I'd like to cover How to Add a new Order under an existing customer
This is helpful when you're looking to -
* Process orders offline
OR
* Credit a customer with a "Free order"
-
Step 1: Access Customer Manager
Login to your SPI account account and click on the Customer Manager. Search for the customer, for whom you'd like to add the new order.
If the customer doesn't exist yet, use "Add Customer" to add a new customer record.
Step 2: Click on New Order
Scroll down and click on the 'New Order' button.

Step 3: Edit Order Details
Select the product, store and shipping information (if applicable)

Turn-on the 'Free Order' checkbox to designate this order as a free one, for which the customer will never be charged.
Note: Orders added using this interface do NOT credit affiliates any commissions.
Step 4: (Optional) Charge customer
If you'd like to immediately charge the customer for this new order, complete adding the new order, then click on the order ID to enter the 'Edit Order details' screen.
Follow steps 4 and 5 here, to process the charge.

Note: If the new order caused the customer to have an outstanding balance and you don't process the charge yourself, the charge will be processed daily when the recurring-payments script runs.
Today, I'd like to cover How to Add a new Order under an existing customer
This is helpful when you're looking to -
* Process orders offline
OR
* Credit a customer with a "Free order"
-
Step 1: Access Customer Manager
Login to your SPI account account and click on the Customer Manager. Search for the customer, for whom you'd like to add the new order.
If the customer doesn't exist yet, use "Add Customer" to add a new customer record.
Step 2: Click on New Order
Scroll down and click on the 'New Order' button.

Step 3: Edit Order Details
Select the product, store and shipping information (if applicable)

Turn-on the 'Free Order' checkbox to designate this order as a free one, for which the customer will never be charged.
Note: Orders added using this interface do NOT credit affiliates any commissions.
Step 4: (Optional) Charge customer
If you'd like to immediately charge the customer for this new order, complete adding the new order, then click on the order ID to enter the 'Edit Order details' screen.
Follow steps 4 and 5 here, to process the charge.

Note: If the new order caused the customer to have an outstanding balance and you don't process the charge yourself, the charge will be processed daily when the recurring-payments script runs.
|
How to setup Order Confirmation emailsMike Peters, June 3 |
Order confirmation emails are delivered to your customers upon a successful order.
You can configure SPI Shopping Cart to send customers a single consolidated receipt with a breakdown of all products they've ordered, or you can send one order-confirmation email per every product ordered.
Catalog-style stores (such as Amazon.com) typically use a single consolidated email receipt, while Infomarketing sales-letter type sites typically use one order-confirmation email per every product ordered.
Option 1: Setting up one Order Confirmation per each Product Ordered
Login to your SPI account, click on System Branding - Emails - Orders, and create a New message.

A good template you can use is:
Once you have your message, use the Product Manager - Select product - Process flow, to associate Order Confirmation messages with individual products, so that every product generates a matching Order Confirmation email, providing customers with details on how they can access their product (if electronic) or when to expect it (if physical product).

Option 2: Single Order receipt with a breakdown of all products ordered
Order receipts are emails that include a summary of all products ordered. The predefined order receipt email ("NewCustomerOrder") follows this format:
Notice the {%shoppingcart%} dynamic tag. This is replaced in run-time, with a breakdown of all products ordered.
Order receipts are defined on a per-store level. Whenever a customer places an order, the store-specific receipt email is used.
To modify, login to your SPI account, click on Product Manager - Stores - select a store and update the Order Confirmation select box:
You can configure SPI Shopping Cart to send customers a single consolidated receipt with a breakdown of all products they've ordered, or you can send one order-confirmation email per every product ordered.
Catalog-style stores (such as Amazon.com) typically use a single consolidated email receipt, while Infomarketing sales-letter type sites typically use one order-confirmation email per every product ordered.
Option 1: Setting up one Order Confirmation per each Product Ordered
Login to your SPI account, click on System Branding - Emails - Orders, and create a New message.

A good template you can use is:
Quote:
|
Hi {%firstname%}, Thank you for placing an order with us today! We're thrilled to have you as a new customer and look forward to building a relationship with you for years to come. Your order is on its way! You can expect delivery within 2 to 3 business days. Please don't hesitate contacting us with any questions or comments. We're always here to help Best Regards, COMPANYNAME COMPANYWEBSITE |
Once you have your message, use the Product Manager - Select product - Process flow, to associate Order Confirmation messages with individual products, so that every product generates a matching Order Confirmation email, providing customers with details on how they can access their product (if electronic) or when to expect it (if physical product).

Option 2: Single Order receipt with a breakdown of all products ordered
Order receipts are emails that include a summary of all products ordered. The predefined order receipt email ("NewCustomerOrder") follows this format:
Quote:
|
Thank you for placing an order with today! We have received your order, and it is currently being processed. What happens next? You should receive another email as soon as we finish processing your order. Your order information appears below: {%shoppingcart%} Important:
Thanks again for shopping with us. |
Notice the {%shoppingcart%} dynamic tag. This is replaced in run-time, with a breakdown of all products ordered.
Order receipts are defined on a per-store level. Whenever a customer places an order, the store-specific receipt email is used.
To modify, login to your SPI account, click on Product Manager - Stores - select a store and update the Order Confirmation select box:
| « Previous Posts |
