Paypal button not appearing with Braintree and WooCommerce

When trying to use Braintree with Paypal on my WooCommerce installation, I kept running into issues. Using Braintree by itself would work fine, but as soon as I enabled Paypal as well I received this following error on the checkout page.

Oops, something went wrong. Please try a different payment method.

The Paypal button would also not appear.

In some instances, in the Developer Console you might see this error:

The problem is that the JS library linked from the WooCommerce plugin is very old and doesn’t support many of the new Braintree features. (And this is the official plugin from WooCommerce…)

To fix the issue, you’ll need to make some changes to the plugin. Be aware: these will be overwritten on a plugin upgrade, and you may need to re-fix the issue.

Edit the file  wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/includes/class-wc-gateway-braintree.php :

Comment out line 108, and add in line 109 as below. You might want to check for the latest Braintree library.

Test it, and everything should be working!

My Braintree plugin setup looks like this. I didn’t need to add a Merchant Account ID to get this to work:

Connecting Google Tag Manager and s2Member

The helpful s2Member Google Analytics page doesn’t cover Google Tag Manager.

If you want to configure GTM with e-commerce transactions, you’ll need to use this code:

Note the  'event' : 'transactionComplete'  line at the bottom. You’re going to use that to make a custom trigger for your e-commerce tracking tag:

The reason for using the custom trigger is that it ensures that the transaction data has been picked up by GTM before the Transaction tag fires. Otherwise you potentially miss the data due to the order of your page load.

The developer guides tell you exactly what variables are required. Standard ecommerce tags have these variables:

Transaction Data

Variable Name Description Type
transactionId (Required) Unique transaction identifier string
transactionAffiliation (Optional) Partner or store string
transactionTotal (Required) Total value of the transaction numeric
transactionShipping (Optional) Shipping charge for the transaction numeric
transactionTax (Optional) Tax amount for the transaction numeric
transactionProducts (Optional) List of items purchased in the transaction array of product objects

Product Data

Variable Name Description Type
name (Required) Product name string
sku (Required) Product SKU string
category (Optional) Product category string
price (Required) Unit price numeric
quantity (Required) Number of items numeric

Creating custom Metadata Field Lists in Lightroom

When you’re in Lightroom’s Library mode, you are able to set the metadata for your photos based on some pre-defined field lists.

If you’re like me, you’ve probably found yourself switching between multiple different metadata field sets, for instance between Default, EXIF, and Location:

But as it turns out, there’s a way that you can set up your own custom field lists so that you can have one screen with every field that you commonly use.

Continue reading

All Marketers Are Liars – Mindmap

This is a fantastic book by Seth Godin. Mindmap is above, and my notes are below.

Do yourself a favour and check it out – Amazon link.

The basic premise is that as consumers, we lie to ourselves. Successful marketers are just the providers of stories that consumers choose to believe.

How good marketing works:

  1. Frame the story in the customer’s worldview
  2. People notice something only when it changes
  3. First impressions matter!
  4. Tell a believable story
  5. Be authentic

On point 5, you must completely dedicate and believe your own story.

There are only two paths to success in marketing:

  1. Invent stuff worth talking about
  2. Tell stories about what you’ve invented

Worldview -> frame story to leverage existing worldview.
Don’t try to change someone’s worldview.
Success = Find neglected worldview, frame story to fit.

Frames are the words and images that reinforce a bias someone is already feeling.

Worldviews are clumpy. Not individual, many.

Worldview != Community. Just because people have the same bias doesn’t mean they talk. But the best marketing happens when they do.

People want to be like others. Make your story easy to share, and something they want to talk about.

People don’t believe what you tell them – precisely because it’s you telling them that, and they are far too smart to fall for that. Instead you have to hint at the facts, and let the customer prove to themselves that you’re a good choice.

The process of discovery is more powerful than being told the “right answer”, because of course there is no right answer. The customer tells their own story.

Honest marketing, two questions:

  1. If the customer knew what you know, would they still choose to buy your product?
  2. After the customer has used and experienced it, will they still believe the story or feel ripped off?

Some senses matter more than others, but all five senses matter.

The best place to start is to copy someone in a different industry who’s telling a similar story. Discover the cues and signals they use. Copy them all, not just a few. Your story is a symphony, not a note.

Ask yourself: what classic story can I tell?

All successful stories are the same. They promise to fulfill the wishes of a consumer’s worldview. They may offer:

  • A shortcut
  • A miracle
  • Money
  • Social success
  • Safety
  • Ego
  • Fun
  • Pleasure
  • Belonging

They can also play on fear by promising to avoid the opposite of above. This list is actually quite similar to Tony Robbins’ list of values.

Successful stories never offer the standard things marketers talk about – cheap price, good quality, convenience, a warranty. They’re not story-worthy, they won’t share it with their friends.

Be uncompromising in my stories. Don’t try to please everyone.

Make my story bigger and bigger until it’s important enough to believe. A movement. Something BIG! and worth listening to.

Definitely a great book and well worth reading!

Check out All Marketers Are Liars on Amazon

Free ClickBank custom redirection plugin

ClickBank only lets you set one destination for a product. But you probably want to send people to multiple destinations for a particular product.

Some examples would be:

  • A free report squeeze page
  • A written sales letter
  • A video sales letter
  • A special promo page that is just for men or just for women
  • Send only some affiliate traffic to a special landing page with no sign-up form pages

The final destination for those three pages are the same product, but you need a way to choose which one your customers get sent to.

What you need is my custom ClickBank Affiliate Redirection Module! (It’s free.)

How does it work?

You upload a special Redirection page to your website, and point all of your ClickBank traffic to that page. Rather than a complicated script or plugin, this one page is all you need.

The Redirection module takes care of sending your customers to the correct sales page, and ClickBank takes care of making sure that sale is attributed to the right affiliate.

Here’s a little diagram:

How to install

Download this zip file. Extract it on your computer, and open the  redirect.php file with a text editor.


The configuration section is at the start of the file.

You’ll need to change line 4 to have your main sales page URL.

Inside the  $redirects section (lines 9 and 10), you can add as many different redirects as you like. Please feel free to replace  keyword1 etc with keywords that mean something to you.

Let’s say you change the first one to be:

"freereport" => ""

This is how your new “Special hop link” will look:

Notice the extra part at the end of the URL? This is the keyword that you used before ( freereport ), and it tells the redirection module to send the traffic to .

It might sound a little bit complicated, but if you run into trouble just get in contact.


  1. Copy the redirect.php onto the root directory of your website.
  2. Change your hoplink destination URL in ClickBank to be
  3. That’s it!

The code

Here’s the code if you’re interested.


Tracking ClickBank affiliates with Google Analytics

Being able to track your affiliates in Google Analytics is vital if you want to maximise your earning potential.

By correctly associating your visitors with the affiliate who brought them, you are able to:

  • Identify the traffic sources for your highest converting visitors
  • Identify your best performing affiliates, and work with them directly
  • Identify new content/affiliate program opportunities
  • Identify the affiliate links/pages that result in the highest click through rate

I couldn’t find any guides out there for doing this, so I decided to put one together myself.

This guide will be written using Google Tag Manager. If you haven’t already switched to Tag Manager, then now is the time. 😉 It’s a MUCH easier experience than having to manage all of your tags the old way.

I’ll be creating a guide for that in the future, but for now here’s a pretty good tutorial:

Once you have Tag Manager set up, it’s time to create the affiliate tracking tag.

Click on Variables on the left menu:


Click on New, and then the edit button, and finally URL as the type.

Configure it to look like this:


Next, go to Tags and edit your Google Analytics tag. Add a custom dimension as in the picture below. You can choose any Index number for the dimension, but you’ll need to know that number later.


Now you need to publish your Workspace.