Sofa Kings

Leave a comment

Your email address will not be published. Required fields are marked *

nineteen + 4 =

Magento: How to Send an Email to First-Time Buyers Only, Even if they Check Out as a Guest

Problem:  Most Magento extensions don’t allow you to target segment customers that have not signed up for an account.  We wanted to send first-time buyers an email to like us on Facebook (we’ll call it our target email here), but only if they were truly first-time buyers.  You run into problems if customers ordered as a guest previously.  If they subsequently place and order a register for an account, Mage will think they’re a first-time customer when they’re not.

Test embed here:

We like to use the Aheadworks family of extensions.  So since we’d bought their Market Segmentation Suite, we tried using that combined with their Follow Up Email to accomplish this.  But using a Magento based method just ain’t gonna work.

Solution: Use MailChimp & Mandrill

This process will record who was sent the target email it and make sure they don’t get it again. It assumes all new orders are first time buyers.  So even if they are repeat customers, they have never been sent this email.  So, we consider them first-timers.  Better to think of them as “first-time recipients of this target email.”

What you Need

So here’s what we did which may sounds a little complex, but will give you the control you need.

Services/applications we used:

MailChimp

Mandrill

Mandrill Integration

We use MailChimp for email blasts. Mandrill handles our transactional emails.  We highly recommend both. If you want to use them with your Magento setup, the extenstion are pretty easy to set up.  Get it done.  MailChimp is getting better at segmenting and automation as well, so their pricier, feature-rich competitors are slowly losing their edge in automation.

But one thing we’ve found the MailChimp still needs work on is their E-commerce reporting.  We could more easily accomplish our goal here by creating an automation where the logic was set up for the marge tag like this: IF Orders (Total #) IS = 1.  But we’ve found the data for Orders (Total #) to be inaccurate to enough of a degree that that logic is unusable. So how do we hack this thing together then?  And why are all the logic gods conspiring against us??

First, make sure to setup the Mandrill integration in Mailchimp.

Create a Custom Merge Tag

Now, setup a new merge tag in your Mailchimp account.  We’re gonna call ours Social Requests.

Lists > select the list you’re working with > Settings > List fields and *|MERGE|* tags > Add a field (the button is at the bottom) > type = Text

Mailchimp add merge tags

Save your changes.

Setup an Automation in MailChimp

Then we’re going to create an Automation in Mailchimp like this.

Create Automation Workflow

Select a workflow = “Integration: Mandrill Email Activity” (it’s at the bottom)

or  Select a workflow =”custom”

Triggers

At the Trigger step, we want to tell MailChimp that our target email should go out after our Magento Order Confirmation email.  That’s our trigger.  And we can use that as a trigger because our order confirmation emails are sent through Mandrill.  We setup the Mandrill integration above, so we should be good.  So, to choose the Mandrill Tags of the order confirmation email.  We have 2 different order confirmation emails and they are tagged in Mandrill like this:

“New Order” and “New Order for Guest”

Select those in the Configure Trigger step.  If you don’t see all your Mandrill tags listed, give it a few minutes to load them all up.

Emails Step

Now, we want to send the target email immediately after the order confirmation email is opened.  You may argue that order confirmations doesn’t have 100% open rate (ours are in the 70s%), so why limit it?  We feel like when a customer opens the email they are at that moment looking at their email.  Sending the target email then means they receive the message when they’re

A. looking at their email – greater likelihood the target email will be seen

B. thinking about us – since they just opened our email

C. trusting us – they just placed an order AND our order confirmation email is really nice so trust is at a high level.

(A/B testing this would be fun – maybe we’ll do that!)

So make sure the target email is set to:  Immediately after workflow is triggered.

Scheduling and Segmentation

Click Design Email for the first (and only, for now) email in the workflow.

After you have all the setup and design of the email done, you’ll get to the step Scheduling and Segmentation. This is where the magic happens, rubber meet road. Here we are going to make sure MarySue Smith doesn’t get this same email the second time she buys.

First we’re going to tell MailChimp to update our Merge field after we send the email.  This will tell us how many social request emails a customer has been sent. We have it enter the number one.

Choose post-sending list action first.  > Update Merge Field  > Social Requests > “1”

Then go back up to Choose segmentation conditions.  Here we’re going to tell MailChimp to only send this email to customers who have nothing entered in that merge field.  Like this:

Choose segmentation conditions > subscribers match the following conditions > Social Requests (our custom merge tag) = “is blank”.  

want to tell MailChimp that after we send this email to MarySue Smith, update her profile.

GET SCREENSHOTS OF THESE STEPS

If you know of a better way to do this, please leave a comment below!

Leave a comment

Your email address will not be published. Required fields are marked *

fourteen − 5 =

WordPress Images Not Showing Up – 403 Forbidden

Wtf.  I had the weirdest thing happen.  Half of my images just vanished.  Scratch that, more like all of them!

Here’s how it started.

We did a domain switch

While setting up this glorious website you’re reading right now, we originally had it pointing to the www subdomain.  So: www.goldengno.me instead of just goldengno.me (no ‘www.’).  But we prefer to drop the www (link to article on why we prefer to drop the www) and so I changed the domain.  Keep in mind this was pre-launch, so no SEO repercussions needed be taken into account.  But in so doing my images pulled a major Kaiser Sozé and POOF they were gone.

But That’s Supposed to be Super Easy with WP

Ok, so to back up for a sec. I’d never done a domain change in a WordPress setup before, but I figured it must be easy.  that what WordPress is good at, making shit easy. And, yup it is. (link to how to change your domain name).  That’s why it was even more frustrating that the images vanished. It’s not like I had some complex sequence of hard core blind Terminal prompting to execute flawlessly.  WordPress made it super easy, but it was like they missed a step.  They screwed up somehow, I now it was on me to fix it!  (Spoiler: they didn’t).

Search / Replace?

I did some Googling and it seemed like everyone was saying to do a find / replace in the database.  I’d checked the database already so I knew the domain was reset correctly in both places.  But I ran a couple of the search / replace plugins anyway.  I’m sure they did what they were supposed to do.  Nothing.

Permissions Issue??

A lot of other people were saying it’s a permissions issue.  They said folders should be set to 755 and files to 644.  There’s some complex code you can put into Terminal to make this happen, but I tend to type fast and typos are not your friend in Terminal.  So I was glad that my FTP Client – Yummy FTP – let me change permissions recursively with relative ease.  (link to how to do that).  Nothing.

So I figured I might as well call my hosting company and at least get in the queue while I continue to research.  I opened a Live Chat box as well, just to cover my bases.  They make you type in your issue before you can get in the queue to be helped.  I did and then…

What’s Hotlink Prevention?

There is was.  The live chat window had a couple suggested help links based on my problem.  One of them seemed ominous.  “You have Hotlink Prevention enabled.”  It said to check the cPanel for Hotlink Prevention and make sure my new domain was in the whitelist.  But I checked and I didn’t have Hotlink Prevention enabled with my host.  That’s when I remembered my Security plugin.

All In One WordPress Security and Firewall

I love this plugin because it makes me feel warm and fuzzy using WordPress.  But it’s complex and you have to be careful to remember that you have all these settings in place. What protects us can also restrict us.  After a few clicks, there it was.

WP Security > Firewall > Prevent Hotlinking.

Prevent Hotlinks in WP Security Plugin

All I had to do was disable it. Save settings. And re-enable. Save settings.  Images now displaying.

Leave a comment

Your email address will not be published. Required fields are marked *

nine + seventeen =