How to Spot Fraudulent Orders on Ecommerce Site

We have included the 6 most important tips on how to reduce credit card fraud on your ecommerce website. These tips are from a standpoint of AFTER A PURCHASE and how to spot a fraudulent order.

spot-fraud-orders

Tip #1 – Check IP Address

In all popular shopping carts, you will obtain an ip address for each order. You will want to check this ip address and IF the order ip is different from the billing and/or shipping address you will want to raise a flag and check further.

* Tip – Go to: http://www.iplocation.net – search for the ip of order and get location by city & state and compare.

Tip #2 – Different Billing & Shipping Addresses

Although this is a fairly common order, having the billing and shipping addresses being different, you will still want to look into these orders. For example, we do not recall any fraudulent orders from orders that had the same billing and shipping addreses. Note that if a billing and shipping address are in a different state completely than you may want to look at this order more in detail.

Tip #3 – Specific Countries

You will note over time that orders to specific countries have more probability of fraud orders. For example, in our latest project, Venezuela was almost always a fraud order. You may even want to consider banning country ip’s from your site.

Also, you may find specific cities, having more potential for fraud (in our real live example, it was Miami, Florida)

Tip #4 – Search on Google

For flagged orders, you may want to search google or google maps to better understand:

a. if order is to a residential or commercial area
b. if order is to a shipping company

You will also want to search for flagged orders for the address + the term “scam” or “fraud”. In one of our cases where an order was shipped to miami, florida to a shipping company, we found other ecommerce websites having the same fraud orders.

Tip #5 – Call Customers

You may want to have your phone number field in your cart as a mandatory field. If so, call your customer and say thanks for their order. During your call, also pay attention to any flags that may arise. (or if you don’t a hold of customer, please note this.)

Tip #6 – Multiple Orders & Quantity

If you receive multiple separate orders or orders with multiple quantity which is much different from your regular average orders, raise a flag and look into this order carefully.

See our video below:

Setup Virtual Phone Number & IVR Extensions /w Twilio

This article shows you how to implement IVR extensions with your twilio phone number.

Step 1 – Register with phone number from twilio

If you haven’t done so already, go to twilio.com and get a phone number.

Twilio

Step 2 – Setup scripts and XML on server

Before you tell Twilio to handle your voice calls with the following scripts, you’ll need to create them.

a. XML file – Output to twilio is handled with xml. Your xml file will run as soon as a phone call is initiated. This xml for example has an intro message and asks the user to input a 1,2,3 or 4 and sends response from phone to our second file, a php file.

Please make sure that you input your intro message and specify at the end of xml, the full URL path of your php processing file. In this case it’s http://www.example.com/handle-incoming-call.xml


<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Gather action="handle-user-input.php" numDigits="1">
<Say voice="woman">Welcome to COMPANY.</Say>
<Say voice="woman">In order to further assist you. Please listen to the following:</Say>
<Say voice="woman">For sales, please press 1.</Say>
<Say voice="woman">For technical support, please press 2.</Say>
<Say voice="woman">To speak with Bob, please press 3.</Say>
<Say voice="woman">For all other inquiries, please press 4.</Say>
</Gather>
<!-- If customer doesn't input anything, prompt and try again. -->
<Say voice="woman">Sorry, I didn't get your response.</Say>
<Redirect>http://www.example.com/handle-incoming-call.xml</Redirect>
</Response>

b. PHP file – This file gets the input from xml (number dialed) and checks the day of the week and time. then it runs a few if statements and either redirects phone number and calls a phone or redirects via a twiml to a voicemail with special message recorded in mp3.


<?php

$dayofweek=date('D');
$hour=date('H');

if(($dayofweek!='Sat')&&($dayofweek!='Sun')){
if(($hour>17)&&($hour<23)){

//ok time to call

$ok='1';
}
}

header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<Response>';
$user_pushed = (int) $_REQUEST['Digits'];
if ($user_pushed == 1)
{
echo '<Say voice="woman">Connecting you to, sales.</Say>';
if($ok!='1'){echo '<Redirect>http://twimlets.com/[email protected]&Message=http://www.example.com/ftZLg.mp3</Redirect>';}else{
echo '<Dial>+13105551212</Dial>';}
}

else if ($user_pushed == 2)
{
echo '<Say voice="woman">Connecting you to, technical support.</Say>';
if($ok!='1'){echo '<Redirect>http://twimlets.com/[email protected]&Message=http://www.example.com/ftZLg.mp3</Redirect>';}else{
echo '<Dial>+13105551212</Dial>';}
}
else if ($user_pushed == 3)
{
echo '<Say voice="woman">Connecting you to, Ori Tzvielli.</Say>';
if($ok!='1'){echo '<Redirect>http://twimlets.com/[email protected]&Message=http://www.example.com/ftZLg.mp3</Redirect>';}else{
echo '<Dial>+13105551212</Dial>';}
}
else if ($user_pushed == 4)
{
echo '<Say voice="woman">Connecting you to, operator.</Say>';
if($ok!='1'){echo '<Redirect>http://twimlets.com/[email protected]&Message=http://www.example.com/ftZLg.mp3</Redirect>';}else{
echo '<Dial>+13105551212</Dial>';}
}

else {
echo "<Say voice="woman">Sorry, You dialed an invalid number.</Say>";
echo '<Redirect>http://www.example.com/handle-incoming-call.xml</Redirect>';

}

echo '</Response>';
?>

* reference – http://www.twilio.com/docs/howto/ivrs-extensions

Step 3 – Login to twilio.com and reference script

Go to “numbers” page, and click on your phone number. Under the “Voice Request URL”, enter the full path on your server to the xml file and click on “save changes”.

Voice Request URL in Twilio

That’s It!.

Please feel free to view complete “how to” video or comment at bottom of this page with any suggestions or questions.

Video Transcription:

Would like to show you how to implement a virtual phone number via a twilio phone number, setup extensions and an automated system (IVR) and to setup some a timed programmatic addition to redirect phone number based on time of day and day of week. In order to implement this, we use a twilio phone number. Twilio enables you to rent a phone number and do simple programming to enhance phone number (voice and sms). In addition twilio is very affordable.

Let’s dive in and begin. We setup a phone number. the test is, anytime someone calls on a weekday during specific business hours, we want to enable them to go to specific extensions, (sales, technical support, etc), and if not within business hours or weekend, it will redirects to voicemail. Pretty soon, we’ll show you the programming.

Register with twilio.com, get a number and login. Go to the “numbers” page and click on phone number. We want to tell twilio what to do when a voice call comes in via the field of “voice request url”. We can select all or inbound and outbound. Also you can set what script to run in case of a sms message. Right now, we’ll go over the voice option. We setup a file on our webserver. In order to actual ger more information, go to twilio docs (http://www.twilio.com/docs/howto/ivrs-extensions). you can download their zip file and read their examples and documentation to help you understand more. IVR allows you to create extensions. For example, an intro message and “for this, press 1, for this press 2” and the script will know how to handle it. Other than php, the examples may be in other languages as well. The docs explains what happens. when a customer dials a twilio number, it goes to twilio’s server and the server triggers the url we just specified. I’m going to dive into this pretty quickly. We’re now going to go to the ftp and create this file. Now’s we’re using our ftp client and editing our php script. In our voice request url, we told it to go to our xml file named
handle-incoming-call.xml. Let’s edit this file. It’s a simple structured xml file which says the following. Whenever you gather an input from the phone call, send it over to another file, our php file. Say in a woman’s voice “welcome to astral web”, then pause and say “in order to proceed”… “for sales press 1”, etc etc. The gather field will listen to the phone and will send info to the php file and if someone did not press a correct number the xml repeats the same menu and waits for correct dial/input. Now let’s edit the php file and look inside. Again the output of the file is in xml and the file listens to the input. If the user presses 1, it will run the first part, if the user presses 2 and on and on. If nothing was presses, it will say in a woman’s voice, sorry you dialed an invalid number and will redirect to the original xml.
the script will check if it’s during business hours and if so, it will redirect/dial to another phone number and if not, it will play the mp3 from twimlet which we earlier recorded for voicemail. Twimlet is twilio’s own language which enables us to add more coding at we did via the twiml is redirect to voicemail, send an email and play as the message on voicemail an mp3 that we recorded.
Instead of mp3, you can input regular text. for example, hi i am not in but remember that in the url, you cannot have spaces. Replace spaces with plus signs “+”. Above in the code, we set the time and date and then checked in if statements.That’s it! I wanted to give one more tip on xml. Make sure you always have double quotes and quotes are closing correctly and that your header is in xml. If you have a problem, you can diagnose via your dev tools and logs area. Don’t forget to test that everything works.

Phone Call Event Tracking with Google Analytics & Twilio Number

This article explains in a simple manner how to track phone calls and call duration with twilio phone numbers and input into google analytics (universal) for event tracking.

Step 1 – Make sure you have google universal analytics on your website

If you don’t, please install the latest tracking code or upgrade at google.com/analytics

Google Analytics Universl Code

Step 2 – Register with twilio and get a phone number

Register and login to twilio.com

Twilio

Step 3 – Create script to input into google analytics

All you have to do is add the following code to a webpage on your server.
DON’T FORGET TO:
a. change ANALYTICSACCOUNTID to your account analytics account id (“UA-xxxx-xx”)


<?php

$datetime = date('m-d-Y--H:i:s');
$call=$_GET['CallDuration'];

header("Location: http://www.google-analytics.com/collect?v=1&tid=ANALYTICSACCOUNTID&cid=123&t=event&ec=Contact&ea=Call&el=$datetime&ev=$call");
exit;

?>

Step 4 – Reference script in twilio

After you login to twilio, on main dashboard page, click on “numbers” page and click on your phone number. Under “voice” section, click on “optional voice settings” in order to open more options and add url of script we just created to “Status Callback URL” and click on “save changes”.

* see google guidelines at Google Analytics Universal – Measurement Protocol Developer Guide –https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide

Status CallBack URL

Step 5 – Test in Analytics

Make a phone call and look at the real-time events section and test over time.

Look at analytics events

Hope you enjoyed this simple video. We love twilio and analytics, especially the bridge between offline and online.

Let us know if you have any questions. We’ll be happy to help!

Video Transcription:

Hey everybody. This is Ori from Astral Web. I’m very excited to create this video to show you how we bridge the gap between the offline and online world. in this video we’re going to track everytime someone calls our phone number, we’re going to put into google analytics the duration of the call. This is a very simple example so you can understand what’s going on and you can build upon that. Very cool thing – let’s dive into it very quickly. The first thing we want to do is buy a twilio number. Twilio is a really nice company and enbales you to add programmatic addons. Go to twilio.com and register and we recommend them. After you register with twilio , login and click on phone number and go under the voice section under optional voice settings and status callback url. What that means is anytime a phone call is completed, at the end of the call it will trigger the url you specify. We will create this script in a second. The script will then take information from twilio and input it into google analytics. Very cool!

Let’s look at the file. eventtracking.php. Let’s go to our server via ftp client and edit eventtracking.php. All you have here are 3 or 4 lines. What i actually did was included the date and the time in order to track in analytics when the call was made and the GET field we receive from twilio. After you get the time and the date from the server plus you might want to adjust the time if your server time is different from you home or work computer. After that you will use the latest google analytics universal url (/collect/). If you don’t have analytics universal you will need to install on website. Let’s look at code and check if we have latest analytics universal code. You can also check in analytics in admin, tracking info and tracking code. It should say, this is the universal analytics code… It came out a few months back (as of 2013). Looking at the redirect header url, google analytics enables you to pass offline information via a collect url in a very simple manner. Now you have to insert different fields. TID is the account id starting with UA dash …. CID is just a userid and this case we don’t use it. Now we specify that we want to track an event. EC category is called contact. EA is the action is called call and the label is the date time and the value is the call duration. So anytime someone calls you at the end of the call, twilio will go to your specified url and the script will give analytics the call duration. And i’ll show you how it looks. In the events section in analytics, you’ll be able to see time of calls and durations. You can translate into minutes instead of seconds. To test, make a phone call and go to google analytics, real-time and look into events and make sure it works correctly.

If you’re running a pay per click campaign, you might want to have different phone numbers
for your landing pages or from SEO. Try to have a unique twilio number for your website, different from your regular store or other numbers for better tracking. Super simple code and works real well. If you have any questions, i’ll be happy to share and answer questions.

Setup Up Amazon Cloudfront CDN on WordPress W3 Total Cache Plugin

Site Speed is one of the most overlooked aspects of a website (at least in my opinion). There have been many research articles about user abandonment due to slow site speed (for example). If possible try to have your website load in less than 2 seconds.

We take this seriously with our clients and love speeding up websites (i personally don’t like racing cars so websites are good for me)

Let’s begin:

Step 1: Install W3 Total Cache Plugin

Login to WordPress and Visit the “Plugins” tab and click on “Add New”. Search for W3 Total Cache Plugin and Install

Install WordPress Plugin

Search for W3 Total Cache

Install W3 Total Cache for Wordpres

Step 2: Sign up for Amazon Cloudfront CDN

If you haven’t done so already, please sign up for Cloudfront at aws.amazon.com. You will need to sign up, enter billing information and proceed to next step.

Sign up to aws.amazon.com

Step 3: Go to Settings and Setup Cloudfront Distribution and W3 Total Cache

In WordPress go to:

Plugins -> Add New -> Install W3 Total Cache Plugin

Scroll down to the CDN box and enter information

CDN -> Enabled

CDN Type -> Amazon Cloudfront

Click on “Save”

Set as CDN Amazon Cloudfront

On Left “Performance” Tab, Click on “CDN”

Go to CDN Tab

Select all desired checkboxes to select what you want to store on CDN

Checkbox Desired CDN Settings

Scroll down to configuration and make sure you have the access key and secret key. You will be able to get access key from https://console.aws.amazon.com/iam/home?#security_credential

Next, you will want to Click on “Create distribution (+ wait 10 minutes)

Click on “test” and save

Tip: You may want to add a CNAME in your dns to keep the CDN references on your subdomain. Great for cleaner URLS and ease of changing CDN’s in the future (see end of video on bottom of this article for CNAME details)

Configure CDN

Step 4: Test Site and Speed

You of course will want to test that the CDN works and site functions correctly and quicker. First visit your domain and check that the site loads correctly and Second, see end of below video for details on how to test specific load speed via gtmetrix.com

Please let us know if you have any questions. We’ll be happy to help!