For about a month, my analytics for Stitch People weren’t super helpful. PayPal kept showing up as the top referral source for transactions in my Shopify store analytics:
As you can see, the bulk of my transactions were showing as having come from paypal.com, which I knew wasn’t really the case. But for some reason, the real referral source of these transactions was being blown away by PayPal.
What’s going on?
It turns out that Google starts a new session anytime someone comes to your site from another site. If we think about this flow when you have PayPal enabled as a payment solution in Shopify (or any other ecommerce platform for that matter), it makes sense. A user comes to your store, adds something to the cart, then goes to checkout with PayPal. They’re redirected to PayPal.com to complete their transaction, and then they come back to your site.
Because someone came to your site from another site (paypal.com in this case), Google Analytics counts it as a new session. This means that PayPal gets credit as the referral for the transaction because it was the last site someone visited before coming to your site and completing a transaction.
How to fix it
First, make sure you’re using Universal Analytics. You can follow the steps outlined here to make sure you’re upgraded.
Now, go to the Admin section in Google Analytics:
Once there, select the Account you want to change on the left:
Now, head to the middle column (Property) and open up the Referral Exclusion List under Tracking Info:
Now, make sure you add paypal.com to this list:
You’ll also want to add the domains of any other payment gateways you’re using. Here’s the official Shopify documentation.
I’ve also heard reports that this doesn’t always work if a user spends a lot of time at PayPal. This could happen if someone clicks the Checkout with PayPal button, gets redirected to PayPal, and then gets distracted and comes back later to complete their checkout. If you’re running into this problem, try extending the session timeout in Session Settings. By default it’s 30 minutes, but can be changed to 4 hours max.
Why does this work?
When you add a domain to this list, it doesn’t create a new session when someone visits from one of these domains. In the case of users checking out with PayPal, Google Analytics will check the referring site (paypal.com) against this list. If it finds a match, it won’t create a new session like it was doing before. Instead, the user session will continue and the transaction will be credited to the right source.
Once I made this change, paypal.com stopped showing up as the referral for my transactions, giving me clear insight into where the money was really coming from.
Keep in mind: This won’t retroactively fix all the transactions that came through with PayPal as the referrer in the past. Because analytics are just a snapshot in time, this will only work for transactions going forward.