Build Your Own Business Website header image

Google Analytics Ecommerce Tracking

Difficulty Level -

Filed Under Topics - ,

Listed Under Lesson Subjects -

Applies to -

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

Part 1 – How to set up Ecommerce tracking with WP eStore

In this session, we show how to set up ecommerce tracking with WP eStore in google analytics so that it can track all sources of your site traffic and where your sales come from.

Video Transcript

Rick: I’m going to talk about the use of Google Analytics and setting up Google Analytics tracking with WP eStore so that you can track your traffic source for sales and track all kind of different information about where your sales come from. And then we’re also going to look at doing a similar sort of thing for AWeber email opt in forms then we’ll be taking some more questions as well.

We’re working here on this site. Actually Susan, I’m going to unmute your microphone here. Good morning, Susan. How are you doing?

Susan: Hello.

Rick: So what we’re going to do is set it up so that you can see where your sales come from.

Susan: Perfect.

Rick: Right? that’s what you want to know. This started from a conversation we had last week where you wanted to know… you were paying for some advertising and you wanted to know what kind of conversion that advertising was returning to you, right?

Susan: Exactly.

Rick: And the one thing we could see was we could see how many visits people… how many visits you’ve got from that advertising but we couldn’t tell whether or not those visits turned into sign ups for an opt in or for a purchase or a product. So we’re going to do both of those things today.

Susan: Okay.

Rick: Okay and so the process I’m describing here is unique to Thesis and it’s unique to WP eStore. And it’s not absolutely unique to Thesis because you could do the same kind of thing in other themes as well but we’re going to have a Thesis-specific step in this. And if you’re not using WP eStore then you’d end up needing to use some kind of a… you’ll need to have a different… you’ll have to add something else to the process that WP eStore handles for us.

But having said that you know, we start off with configuring everything at PayPal. Now this is my PayPal account and what we need to do is set up a return URL from PayPal and we need to set up a PayPal PDT Identity Token and you already have that set up. And I’ve got lots of videos in the site about how to set that up and I’m just going to show briefly what that means.

So if you’re on your site, on your PayPal account, you go over to your profile. What you’re looking for is your selling preferences and I’m going to end up picking exactly the wrong one again, I think. Website payment preferences… yeah no, I did pick the right one. So website payment preferences, you have to turn the auto return on and then you need to provide a return URL and this URL is a page on your site that will have the code on it, that PayPal will pass and the WP eStore will use and then ultimately Google Analytics will track.

And then you also need to configure payment data transfer and that’s essentially turning this on and then getting your payment, your PDT identity token. And this is the token that we’re going to insert in the WP eStore or when we configure WP eStore. This is the return URL that we’re going to insert when we do the same thing with… in WP eStore.

So with these two bits of information, we can configure WP eStore to do this. So if we come on over to the dashboard and scroll down to WP eStore and we’re going to go to settings in order to make this work. And we start off in General Settings and what we need to do is set up a return URL. Now if scroll down here and look at the second section, General Image and Page URL settings, we have a return URL specified right here. This is The Confident Mom Checkout Thank You page and this is the very same URL that needs to be specified here. Now I’m looking in your PayPal account. This is my return URL obviously. But you would take this return URL and make sure that it’s inserted in this place in your own account and the return URL really needs to be you know, a page that’s set up that says, “Thank you.” And we’ll talk more about this here in a minute but that’s what this page is. This is the return URL is this thank you page that gets placed both in your PayPal settings and also your WP eStore settings.

So once you have that taken care of then you keep on scrolling down here to Post Payment Processing and that is right down here. And you have it set up properly. You could check “use automatic post payment processing” and then also, “enable transaction result display”. Now when you click on this, this will provide the data that’s necessary for us to place on the Thank You page when the transaction actually happens. So anyway, you have to have this thing checked.

And then you can save these settings so that’s all you need on this page. But then you go over to the Payment Gateway settings and on the Payment Gateway settings under PayPal, of course, first you have to use a PayPal gateway and you have to include your necessary PayPal information here. The critical part of this is putting your PDT identity token in this box here. Now this is your PDT identity token, of course, and not mine but that’s what it is. It’s this long set of code that you’re going to insert into this PDT identity token. And then once you have that stuff configured, you can save that.

And then finally, you need to go over to the 3rd party integration and scroll down here to Google Analytics tracking. And you need to enable Google Analytics tracking. So that box has to be checked and you hit update.

And with all of those things set, now you have PayPal configured properly. You have WP eStore configured properly. And so now we need to move on to our Thank You page and configure our Thank You page properly because we have on page stuff that needs to be set as well.

Now this little paragraph, “Thank you for your payment. Your transaction has been completed and received. Your purchase has been emailed to you. You may log in to your account at to view details of your transaction.” This little paragraph information is actually taken from their requirement. They require that when you… oh actually, oh let’s see. This is it right here. This is the example text that they require on the return URL and that’s what we’ve placed on your page, this example text. Now it doesn’t have to be this exact text but it’s got to include this information in order for it to be in compliance with PayPal.

So then there’s one other thing we need to do on this page and that is put the WP eStore shortcode on the page that returns the transaction result when somebody had made a purchase. And that is this shortcode right here, wp_eStore_transaction_result: end. You need to have this shortcode placed on this page in order for all of the system to work properly. And you do have that so we’ve got that part of it taken care of as well. So we have PayPal, we have WP eStore and now we have our Thank You page set up correctly.

The next thing we need to do is install another plugin and that plugin is the Yoast Google Analytics for WordPress plugin. And so first, we’re going to go make sure that you don’t have any conflicting plugins installed. I didn’t look at this yet. But we want to… we need to deactivate any Google Analytics… yeah, we need to deactivate Google Analyticator and we need to make sure there aren’t any other analytics tracking things there. It doesn’t look like it. Okay so Google Analyticator was the only thing you had.

So now we’re going to add a new plugin. The reason why we have to use this specific plugin is because this is the one that WP eStore has configured itself to use. So we’re going to search for Google Analytics, if I can spell. So we’re looking for the Yoast which is this one here, Google Analytics for WordPress by Joost de Valk and we’re going to install that. Activate it. Now you’re not going to have your nice little things on the bottom that show you where people come from and that kind of stuff.

Susan: Oh okay.

Rick: But you should really just get used to using your analytics anyway because…

Susan: Yeah, right. I get that. Well, I can see where that… a lot more information and I can see where yeah… using that is more beneficial anyway so…

Sure. Okay now it says that we have to select which analytics profile to track which means that it must perceived a couple of different… authentication with… well okay, let’s just go ahead and configure this and see what it says there.

Rick: Okay, to grant access… okay. It’s actually wanting to try to access it from mine and if you have multiple… you want to switch to the right account first since Google doesn’t let you switch accounts on the authentication screen. I’m going to manually enter a code here instead because I can get the UA code from your… we’re not going to do the automatic thing. I can get your UA code easily. So if I’m in Google Analytics and I go over to the Confident Mom and just go to settings for a second here, this is the UA code right there. I’m just going to copy that UA code and manually place it in there. So we’ve got the right thing now. We want it to be placed in the header just like it says. We’ll go ahead and track outbound clicks and downloads and we’re going to leave all the rest of that stuff alone and just hit update Google Analytics settings.

And so now we have Google Analytics properly configured. I mean really, there’s nothing more to do than simply that, installing it and configuring it. However, we do have to do this Thesis-specific thing which is to make sure that we don’t have any other code in Thesis that is going to interrupt or interfere with this.

And so we’re going to go over to Thesis Design Options or Site Options. Now in Thesis Site Options, Thesis has this place for stats and tracking scripts. And this is where people routinely put Google Analytics tracking scripts. And we need to make sure that we don’t have any Google Analytics tracking scripts in either of these two spots, either in additional scripts or in the bottom scripts. Now we do have our site verification code which is not a Google Analytics tracking script. This site verification code is there so that you verify your ownership to Webmaster Tools. So we don’t want to delete this. But because we are using the Google Analyticator plugin, we had actually used Google Analyticator as the means of entering your tracking scripts. So it’s not… so Thesis doesn’t actually have this but I think most Thesis users will have Google Analytics tracking code in here. And in fact, I should probably just show you what that looks like because I do have that set up here on this site.

So if we come over to Thesis Site Options additional scripts… oh okay, I’ve got my verification script there. This is my tracking script. This is the Google Analytics tracking script and if this was on your site, we’d want to delete it because Yoast takes care of this. And if you had it in two places, it would break the tracking. Anyway, you’d want to make sure that that’s removed.

And then once you’ve done that, all we have to do is go over to Google Analytics and finish our configuration on Google Analytics. Now actually, I’m going to go all the way back to the homescreen here for a second. So when you select Google Analytics, the first thing you see is your account home and we’re going to select the Confident Mom site. And this is what it looks like the very first time you… or when you arrive at your site immediately. Now what we want to do though is come over to the home tab and then select this settings tab. And that gets us over to our settings section which, in particular, we want to go down to the profile settings. Because under the profile settings is where we’re going to tell it that it’s an ecommerce site. So we say yes, it’s an ecommerce site and really, that’s all we have to do. Hit apply.

And that pretty much… I mean, that’s all the settings necessary in order for you to be able then to go back to your site and go to conversions and go to ecommerce. And you can see right now, it hasn’t tracked anything because we just did it a few minutes ago.

0 Comments… add one
0 comments… add one