DIY Facebook Retargeting – Wrap Up

Wrap Up

Don’t be content to simply run ads and hope they are effective. Using retargeting can greatly boost the effectiveness of you adverting. You can rein in visitors who have shown interest and then left for some reason, giving you another chance at the sale, which is extremely powerful since most people take a while to make a purchase decision. And if they forget about your product before they buy, they’re usually gone for good.

Retargeting makes it easier to present your products to the same person multiple times without the need to get them to come back to your website or even get them on your mailing list. You can simply target them with laser-guided precision on a site they already visit many times each day – Facebook!

Facebook has made this almost brain-dead easy. As long as you are careful to install your tracking pixel and set up your rules and matching ads, you will be able to target those visitors like never before!

And best of all, retargeted ads typically convert much, much better than standard ads, so you have the real potential to skyrocket your income by using this simple retargeting system.

Good luck!


Here are some resources you may find helpful for learning more about Facebook retargeting:




DIY Facebook Retargeting Part III – Targeting Your Audience

Target the New Audience with an Ad

Now that you’ve created your custom website audience, it’s time to target those people with a specific ad. It’s a good idea to use an ad that is specifically geared toward the audience you just set up instead of just using your standard ad.

For example, if you set up a rule that targets people who have visited your Shoes category, you can target shoes specifically rather than a generic clothing ad.

Alright, let’s get that ad set up.

Step One: Visit the Ads Manager


Step Two: Choose your Objective

This will take you to the ads creation page, allowing you to set up the ad that will match your rule set.

Step Three: Scroll to the Audience Section & Choose the Audience   

The audience section will allow you to choose Custom Audience in the form field. Here, you will enter the Custom Audience you’d like to use.

Step Four: Create your Ad

Now just set up your ad as you would any other Facebook ad!

Alternatively, you can use the Power Editor to create the ad.

Step One: Visit the Power Editor Page


Step Two: Click Create Ad

Step Three: Select the Custom Audience

Under the Audience section, just choose the Custom Audience you’d like to use.

Step Four: Finish the Ad

Now just proceed as usual to set up the ad, as you want it.

That’s really all there is to it. It’s a lot easier than you might think to set up a retargeting campaign, and it’s definitely worth any effort you put into it. Remember, as with all ads, the more specific you are targeting, the more effective each ad will be.

Here is a guide on planning custom audiences that will help you learn more about setting them up:


Next article wraps this up.

DIY Facebook Retargeting Part II – Configure Audience Rules

Configure Audience Rules

Now it’s time to start retargeting those people who visit your website and receive the cookie.

Step One: Name Your Campaign

Give your new audience a name and description. This doesn’t matter. It’s for your benefit to help you identify the campaign.

Step Two: Set Up Audience Shaping

This can only be done to match a page that already has a Custom Audience pixel installed.

You can choose to match all visitors by selecting “All website visitors” or you can only target people who visit specific pages on your website by choosing “People visiting specific pages.”

If you choose to set up specific pages, you will need to fill in a couple of other options to help identify the exact URL(s) you want to target.

You can also set up a number of rules that help you target pages on your website instead of specific URLs.

For example:

  • If you’d like to match visitors to any page, just click “All website visitors”.
  • If you want to match only your homepage, just choose URL, then Equals to, and then enter your homepage address including the http:// or https://.
  • To match a subdomain, choose URL, then Contains Any, and then add your subdomain such as

To match a specific page and exclude something else, you can choose URL and then Contains Any, then add the word you’d like to target. Then to exclude a word, click the plus sign and choose URL, then Doesn’t Contain, and then the word you’d like to exclude.

  • Use the + button to add as many rules as you need to target visitors the way you like.

Here is the complete table showing customization options as it appears on the Facebook website:

Step Three: Add a Retention Timeframe

Finally, select an expiration date for the audience. By default, it is set to expire after 30 days. This can be set anywhere from 1 day to 180 days. Once an individual has reached this maximum timeframe, they will no longer be targeted by your retargeting campaign unless they visit your site again, which basically treats them like a new visitor.

Next article is the last one, targeting the audience.

DIY Facebook Retargeting Part I – Setting Up Retargeting

This is the first part of a three-part series.

Now that you understand a little bit about how retargeting works and why it is so powerful, it’s time to get into the nitty-gritty of exactly how to do it.

There are several ways to retarget your visitors using Facebook. We’re going to take a look at how to set up and use website visitor retargeting, which is the most common type.

Setting Up Website Visitor Retargeting

The most common method of retargeting is to target your ads toward people who have already visited your website. This is helpful, because as we mentioned earlier, it will help you convert people who were proven to be interested in what you have to offer but did not, for whatever reason, choose to purchase.

To target this way, visit your Facebook Ads Manager:


If you are re-directed to ( then simply click on the “Login to manage existing ads” link highlighted in the screenshot below by the red arrow and it should take you to
>> even if you have never created a Facebook Ad before.

Either way, this is the page you want to get to: >>

From this page, you will want to choose “Audiences” from the left sidebar and then click “Create a Custom Audience”.

Select Custom Audience from your Website.

Agree to the “Terms for Custom Audience from your Mobile App and Website” by clicking the check box and click Create Web Remarketing Pixel.

Once it generates the block of code, copy the entire thing and paste it into your website on every page immediately before the closing </head> tag. You can also put it into header.php if you use something like WordPress that uses a header file to manage code.

Next article I’ll show you how to configure the audience.

How Facebook retargeting works

How Does Retargeting Work

Retargeting allows you to take visitors who have already visited your website in the past and perhaps didn’t purchase anything and bring them back for a second chance at a sale by using Facebook ads that deliberately target ONLY those people who have already been to your website in the past.

This allows you to get ads that are much more precisely targeted than any other type of ad could ever be, because they are based directly off proven data. Users have already shown an interest in related material.

How it Works:

  1. A customer visits your website, and a cookie is set in their browser.
  2. When the user goes to Facebook, they see an ad that is specifically retargeted to them based on their visit to that page.
  3. The customer may then come back to the site and buy.

So you may be wondering why you’d want to bid for an ad delivered to a customer who has potentially already viewed your product, when you already know they didn’t buy.

It’s simple. It gives you another chance to convert that visitor into a sale. They were interested. Otherwise, why would they have visited your page? But for whatever reason, they decided not to purchase at that time.

It may have been lack of money. It may have been that they thought the price was too high. It may have been some other element on your page. But for whatever reason, they didn’t buy.

This gives you a chance to retarget that user, perhaps converting them into a buyer.

Remember, it takes some people a few times seeing an ad or product before they make the decision to buy. This gives you multiple opportunities to target that user instead of just the one when they come to your site.

This also brings you another opportunity: to make changes to the product’s presentation (such as a discount, free shipping offer, guarantee, or some other tweaks) in order to convert the buyer.

Retargeting in 5 minutes

What if you had a second chance to turn that lost visitor into a buyer?

Facebook has been one of the most effective advertising platforms for a long time – at least if you know how to play the game. The trouble is, most people don’t know how to properly maximize their ad campaigns, and thus they see horrible returns or even little to no traffic at all. Or they may see CPC that are way out of the affordable range.

It’s no wonder ads have the potential to be so effective. Facebook has a truly massive number of daily visitors, and those visitors are also typically very responsive and very voracious. But their internal ad system leaves much to be desired as far as targeting.

Fortunately, Facebook has developed a way to advertise to specific audiences such as website visitors. All you have to do is place a tracking pixel on your website, and it will insert a cookie onto each visitor’s computer so that when they later visit Facebook, an ad can be delivered to them based on your website.

If you use Facebook regularly, you’ve probably seen this in action. Ever go to Amazon and look at a particular product, and then see that product advertised on Facebook later? It’s no coincidence. It’s Facebook retargeting!

In this guide, you’re going to learn about how Facebook retargeting works, why it is so powerful, and how you can get started using retargeting to reclaim your website visitors and turn lost visitors into sales!

In time, you will see how powerful these techniques can be, and you will come to understand exactly why you should be using this powerful technique to bring back those lost visitors!

Identity Providers to the rescue

WhoAmIThe problem: I have to allow outside,  non-company users SSO (single sign-on) to a Salesforce Portal and I don’t know how to do this.

These users are external to the company and are not in any repository in the company, they are just in Salesforce as portal users. How can I make this work?

First, about the requirements. These users are people we do business with and the portal is a website Salesforce let’s us create that we expose data and reports to in the way we wish. We provide these users, these partners, with tools and data they need but keep them from accessing our Salesforce Org since they are not part of the company.

Our company uses Microsoft’s Active Directory to manage users and credentials. We SSO to our Orgs using AD and the ADFS (Active Directory Federation Services) product making this duo an IdP (identity provider). Works well and was easy to setup in Salesforce.

Second, the portal users are known in our Salesforce Org and not to our company. The company has a firm set of rules emmanating from our security folks that only company employee’s and contractors are permitted in our AD. Fine.

Third, SSO requires that a user, the principle, is known to something providing identity, his operating system or an app coupled with IdP, and sign onto SSO compliant SPs (service providers) which in this case is the Salesforce portal. But our partners log into their own computers in their own businesses. Possibly with their own ADs but more likely not. They just have small, local networks they sign into and there is no IdP on their end. And that’s the problem in a nutshell, they log into their own networks which are unknown to us. We simply do not have an identify for them that we know about.

What do we do to accomplish our goal?

The answer is we need to rethink our IdP and find another architecture that works. This article provides the solution.

What’s really interesting is there are many products out there that can be used and until I was confronted with this requirement I had no idea just how many there are.

Here’s a picture of what we have right now.

Two identity needs, one solved by identity provider, the other not

Two identity needs, one solved by identity provider, the other not


We have two authentication paths, Salesforce authenticated by ADFS for internal users and Salesforce Portal authenticated using the Salesforce username and password.

SSO for both paths is simple and requires two more products and some work. It never used to be this simple but it is now. We add an IdP and a private database to handle the external user case. This solves the problem at hand and possibly solves other related problem explained shortly. First, how does this solve our problem?


All SSO clients talk to one, new identity provider

identity provider consolidation



What do we use for the IdP? This really surprised me. There are quite a few IdP products, both commercial and open source. Wikipedia has a lovely article with an enormous list of just SAML IdP products.

Two examples of open source products are SimpleSAMLphp and Shibboleth. Don’t you love the names?

SimpleSAMLphp is a set of PHP scripts implementing both an IdP and a SP. If it works, WOW.

Shibboleth comes in two flavors, an IdP and a SP. WOW again.

Commercially you have a product like Entrust’s IdentityGuard.

The differences between commercial and open source products can be significant. Commercial products tend to enlarge the boundaries of the problems they solve. IdentityGuard can handle a large variety of credential repositories making it easy to take on all roles for Identity Providers. Open source products tend to be more surgical taking on core needs only. With that said, the array of products is astounding.

So in this case we put the Idp in front of ADFS for internal user identity and the IdP in front of a database for external user identity.

Opening the door for more solutions

Consolidating the interface to all IdP activity to the one IdP product, commercial or open source, permits you to build all your future solutions on this architecture. Seems like a no brainer doesn’t it? Well, you might miss this so lets discuss it a bit more.

First, you can shape programmatic interface to this IdP using your favorite stack. So if your a Java house, a .Net house or something else you’ll develop code and libraries talking to this one IdP rather two or more. This simplfies things today and down the road.

Second, you skew the next SSO requirement to this architecture rather than creating another point solution. Suppose you wanted to interface Salesforce or someother application to an internal web app and SSO from the external app, Salesforce, to the internal app, what would you do? Before this you’d be searchaing for the IdP solution just for it. Now, you think in terms of this architecture and plan the solution where you sso using this IdP.

If this IdP product supports at least one, well known and used protocol like SAML 2.0 you should be in good shape for some time just relying on this. You not only use the IdP product as a solution component you also develop code and processes to take full advantage of this consolidated architecture.

You will develop code to provision new service providers, manage both internal user credentials and external user credentials, and manage how processes use this product. Lots of opportunity to simplify your code base because you’ve moved the SSO and Identity solution from tactical point solutions (ADFS SSO for internal users and username/password external users) to one strategic enterprise solution (SSO for all).

What next?

I may implement a reference architecture just to show to all that this is right and doable. That remains to be seen. For now, I just introduce the concept to you and hope it helps shape your thinking.

Share your thoughts in comments. Cheers!




Salesforce Scripting

Don’t have a name for it yet and every project deserves a name.
The company, Salesforce, has not provided a means to script management or administrative functions.

Perhaps they think it’s not needed, perhaps they are remaining agnostic waiting for others to do it, or perhaps they think it worthwhile but have not decided what to do.

I don’t know. I don’t care.

I’m working on a scripting package or toolkit written in Python based on the simple_salesforce Github project. simple_salesforce is a low level kit that needs abstractions. I’m just the guy to do this.

Stay tuned…

Fox’s point system works for idea extraction too

Jeff Fox book cover for how to become a rainmaker

Jeffrey Fox wrote a number of excellent books on business. The first one and perhaps one of the best is How to become a rainmaker. The book is strategy after strategy to make yourself into a top notch salesman. To keep yourself doing what’s important he offered a system. Fulfill the system and you’ll always “never run out of prospects, your pipeline will always be full, you will never have a slow period, and you will always be making rain”. Pure gold. Here are the points:

  1. Get a lead, a referral or an introduction to a decision maker
  2. Get an appointment to meet with a decision maker.
  3. Meet the decision maker face to face.
  4. Getting a commitment to close or an action leading to a close.

Work to get 4 points/day. Any way. Example: Get 2 leads or referrals and get 1 appointment (1 + 1 + 2 = 4).

If you’re selling, it’s a great book. Get it. Read it. Study it. Implement it.

If you’re doing IE (idea extraction) this point system is not aligned with what you’re doing. However, we can adjust it this way. First, if you can do IE full time and second, if you only have an hour or two a day.

IE version if you have the whole day

  1. Get a lead, a referral to a decision maker in your niche
  2. Speak to the prospect
  3. Do IE with the prospect
  4. Find a deep pain

IE version if you have an hour a day

  1. Get 20 leads to call
  2. Make calls until you speak with a decision maker
  3. Do IE with a prospect
  4. Find a deep pain

In both cases, seek to get 4 points a day at a minimum. Any combination will do. But you cannot just do step 1 four time every day. It’s simple, you have to speak with prospects and take action.

Try this point system and see if your IE doesn’t improve.

Shutting down Apache on Mac Mountain Lion is not easy

Mountain Lion (OS 10.8) is at this time the newest version of the Mac OS and the changes to the Apache web server that ships with it lead many bloggers to misinform readers about controlling the server. Let’s set the record straight.

You want to shut Apache down so that it releases it’s locks on files and so that you can launch Apache in single process mode for easier debugging. While Apache is running you may not be able to edit your web site/app files if the server has locked them. Shutting the server down frees the locks letting you edit or replace files. Then, for easier debugging, you may want to start up Apache consuming one process. To start it up this way you first have to shut it down. These are both good reasons and this article shows you how to shut it down.

Blog after blog say to shut it down use apachectl

sudo apachectl stop

Well, this doesn’t work on Mountain Lion.

As it turns out there is a launch daemon for apache that restarts the stopped apache. To stop apache you have to unload the launch daemon.

sudo /System/Library/LaunchDaemons/launchctl unload org.apache.httpd.plist

To verify that you’ve stopped apache, use ps and grep

ps -ax | grep -i httpd

You should see the console session returned and no other lines with httpd in it. If you issue this several times in a row and the only thing returned is one line for the console sessions, you have successfully stopped the daemon.

Then to start a single process Apache

sudo /usr/sbin/httpd -k start -X -f /etc/apache2/httpd.conf

Once again use the ps and grep command line and you’ll see

/System/Library/LaunchDaemons: ps -ax | grep -i httpd
 6098 ttys002 0:00.00 grep -i httpd
 6094 ttys003 0:00.02 sudo /usr/sbin/httpd -k start -X -f /etc/apache2/httpd.conf
 6095 ttys003 0:00.17 /usr/sbin/httpd -k start -X -f /etc/apache2/httpd.conf

To find out how to do this took considerable time – many blogs say it’s just apachectl and it’s not. Hope this helps.