This is Jared with Carbon Digital and today we’re talking about Google Analytics and how to exclude either logged in users or either your actual access to the website itself. To exclude Google Analytics traffic, we're going to be using filters.

Failure to exclude Google Analytics traffic for yourself, or employees, can result in false data. Realistically, it will give you the impression that your visitors and their actions are higher than reality. So, it's important to exclude your team from the data.

Don't have Google Analytics already setup?

If you haven't already setup Google Analytics on your website, don't worry. It's a fairly simple process. You can check out or other videos on how to setup Google Analytics on the following website platforms:

Once you've added Google Analytics tracking to your website, you can come back here to learn how to exclude Google Analytics traffic for your team!

Problem: Inflated Traffic Data

exclude google analytics traffic wordpress dashboard analytics

So, you can see here we’re on a website, it’s actually the Carbon Digital website. We're currently using WordPress, and here in the bottom right, it shows that we have a few different countries with some regular traffic to our website.

In the top right corner you can see that there are 147 page visits in the past 30 days. We don’t do much marketing or advertising so It’s going to make things interesting for sure when we review our numbers after exclude Google Analytics traffic for our team.

Getting Started to Exclude Google Analytics Traffic

We want to make sure that our traffic isn’t actively messing up the Google Analytics data. You're in luck because there is a very simple fix for this. So, what we do is we go into Google Analytics and create "filters".

Filters allow us to include or exclude Google Analytics traffic using specific pieces of information based on specific criteria. The three things that we will be excluding today are:

Google Analytics Home Dashboard Page

Once logged into Google Analytics, you'll be on the home page dashboard. From the home page here, on the bottom right hand side we’re going to click on admin.

exclude google analytics traffic home page

Google Analytics Admin Page

And so, you can either access the filters through the main panel on the left side, or you can go to the actual view on the right-hand side and click on filters.

exclude google analytics traffic admin page

Please note that this is solely for the "view" that you have selected. Also, note the following for the columns in the admin page.

Google Analytics Filters Page

Once you are on the filters page, you can see that there will be a list of active filters here. It's here that we will establish the rules to exclude Google Analytics traffic.

So, I have already created a filter for my custom login URL here, so we have set the exclude Google Analytics traffic for this custom login page. And now what we’re going to do is we’re going to add our IP address.

exclude google analytics traffic filters view

For reference, the Internet Protocol (IP) address is basically like a street address for your computer.

Finding your IP address is actually quite simple. We will need the IP address to exclude Google Analytics traffic for an individual user. If you go to Google, you can simply search for “what is my IP”. In the search results, there is a box at the top of the search results that show you. Boom!

*Note*: While IP addresses are considered public information, it's a best practice to keep these secure. Which is why we aren't showing our IP.

So, just copy that number and navigate back to Google Analytics.

Google Analytics Creating a Filter

We’re going to add a new filter by clicking on "Add Filter". The first thing to do is to enter the filter name. We’ll call this one “Remove Jared’s Traffic”. Then, under the Predefined filter type, select the following:

Then you can simply paste in your IP address into to the text box. Once you complete that you can click Save.

exclude google analytics traffic create new filter

So, now Google Analytics isn’t going to capture any traffic from me going to my own website. How crazy is that?!?!?! That's the power we have when we exclude Google Analytics traffic.

Are you tracking internal URLs?

Another piece that’s highly important to identify is whether or not you're tracking internal URLs. For websites that are built on a Content Management System (CMS), when you login to your website, the URLs are known to change.

For example, when you login to a WordPress website, all of the admin / dashboard pages show your domain followed by "/wp-admin/" and possibly more.

These are internal subdirectory URLs, and in most cases you don't want to track these, so we will definitely want to exclude Google Analytics traffic for these URLs. There are instances where you want to track a logged in user, but it's specific to your website structure.

For example, if you have a membership site, and you're looking to improve the User Interface (UI) / User Experience (UX) then you could track internal pages to gain insight. In these cases you wouldn't want to exclude Google Analytics traffic for all logged in users. You'd want to be laser specific.

So, if you don’t have a need for tracking internal URLs for customer traffic, and it's just employees / contractors / freelancers, then you want to add this next filter.

Exclude WordPress Admin URLs

exclude google analytics traffic filters view 2

Click on the “Add Filter” button. This time we're going to input the following info to exclude Google Analytics tracking data:

I like to use "contain" here just to make sure that we capture everything that could come up in the future. Next we're going to add the subdirectory

For example, we’re using a WordPress website. So, when you’re logged in, you’ll see that in the URL bar it has your URL, then “wp-admin”. So, what we’re going to do is take “wp-admin” and add it between two slashes like what is currently highlighted in the image below. This will exclude Google Analytics traffic for all logged in users.

exclude google analytics traffic wordpress admin urls

Once you've entered that (see image below) you can click on the save button.

exclude google analytics traffic create filters 2

So now, Google Analytics will no longer track any users that are logged into the website. Awesome! Let's continue to exclude Google Analytics traffic for WordPress URLs that we don't want to track.

Excluding WordPress Default Login URL

Another thing you’re going to come across, for WordPress specifically, is the login page. By default, the WordPress login page is your domain, then "/wp-login.php".

Click on the "Add Filter" button, and let's get started adding a new filter.

exclude google analytics traffic filters page 3

This time, we're going to add a custom filter. We're going to call this filter “Remove Login Page”. Under the custom filter type, select “Request URI”. In the Filter Pattern box, type in “wp-login.php” and click save. NOICE.

exclude google analytics traffic create filter 3

So right out of the gate there that’s going to exclude our login page, our logged in users and our personal traffic. This process can be repeated as many times as needed for you to exclude Google Analytics traffic, based on your website and requirements.

Watch on YouTube

This is just a general video to sop tracking your employee data and your personal data with Google Analytics. When you exclude Google Analytics traffic for your team, you are making a contentious effort to gain accurate insights. And so, from this point moving forward, Google Analytics itself is not going to track that information anymore. That’s very useful, and very critical to the overall success of your data integrity.

Today we're going to be talking about how to set up your Instagram access token. First, we have two different websites that you need to look at. The first one is Instagram.com/developer. The second one is Oceanwp.org/Instagram. So let's get started with your Instagram developer login.

In the top, right hand corner you're going to click on the login button. I'm just going to login to my Instagram account while I pause this momentarily. I'm in, so, the first thing you're going to do at the top bar you see the gear icon with managed clients, click on that and it's going to open up a developer sign up, all right? The first thing you're going to do is type in your website, https://fightersolutions.com, and that's our phone number. What you want to build with the API is the question that we ask. You're going to type in something simple. To create Instagram feed on my website, very simple.

Below that box you're going to find a check box, I accept the API terms of use and brand guidelines. I've already read over this, so I know what it says. Want to make sure you read that as well. Most of it's pretty standard stuff, but nonetheless, want to make sure you're covered. Once you've done that, check the box and click sign up. It's going to bring you back to this page.

In order to get this thing going, you're going to go back to the very top, click on the same gear, managed clients, and you're going to come over and it's going to say register a new client. Click there. All right, so the application name, you're just going to give it a name that you want, I'm going to go with Word Press Instagram feed. Description, Word Press Instagram feed, simple enough. Company name, you're going to input your company name, Fighter Solutions LLC, URL https://fightersolutions.com.

Now this next part is interesting. Valid redirect URIs. Now because we're using this other website, the oceanwp.org to get our Instagram access token, that's the website you're going to use, so make sure you copy that URL and then come back to your Instagram developer page and paste that in where it says valid redirect URIs, all right? This is very important or its not going to work. All right, the next box it asks you for your privacy policy URL, and mine is located at https://firesolutions.com/privacy/policy. Contact email, info@firesolutions.com.

Once you have everything filled out here, you're going to switch over to the security tab. You're going to disable implicit O auth, make sure that's checked, switch back to details and validate all of your stuff is all there, and then once you've done that click register at the very bottom. Boom. You've filled out all required fields. Well, that looks like it's filled out. Ah, right there. Do not use Instagram, IG, Insta or Gram in your active name. So, I'll take out Instagram and just say Word Press website feed. All right, and then try that again. Register, and now it's registered.
All right, and you'll see here that it says that it's in sandbox mode, that's not a big deal. All right, so you're going to take this client ID, you're going to copy it, and you're going to bring that over to this ocean Word Press org Instagram URL and you're going to paste it into your client ID and get your access token.

Dang, it's in sandbox mode and we have received an error. So the only way to do this is to authorize, okay? Now, the reason you're getting sandbox mode is because it's in sandbox mode. If you're doing less than 20 photos, I believe, you do not need to request formally for the live production feed from Instagram. You can just do 20 posts or less with this sandbox version. If you're looking for the most recent 10, that's not bad, all right. So, I don't need 10. Actually, I probably only use six or eight depending on my website, so this is good enough for me, so I'm going to click cancel for now, just to show you what you need to do.

If you do want more, you're going to come back to this developer page, you're going to come over to ... once you're under the managed clients section, and you navigate to your client ID section that you just set up. Click manage, and it's going to bring you to where you can request this, all right? What you're going to do is you're going to go to the security tab and make sure you're disable implicit O auth is unchecked, then you're going to go to sandbox, validate that you have a user, next tab is permissions. Validate that you have it. Then go back to migrations and verify that this is what you want here, non square media. I have no idea what that does, honestly.

But when you're ready to push forward, you're going to go to permissions and click start a submission. This is a submission to get approval to use this client ID outside of the sandbox mode, all right? So if you click here, start a submission, it's going to give you a question here. Right here, my purpose is I want to display Instagram posts on my website, so I click this here, and right there it'll tell you you do not need to submit for review for this use case if you're a developer and you want to display Instagram content on your website, then you do not need to submit your app for review.

By using a client in sandbox mode, you can still access the last 20 media of any sandbox user that grants you permission. So just like I said before, if you're going to use more than the last 20 posts, or 20 images or whatnot, then you do not need this, so this is the case for us, let's go back. So, in the top bar click on managed clients and then highlight your client ID. Copy it again just to validate that we have it, then we're going to switch over to the ocean Word Press website, and then we're going to paste in our client ID again and press get my access token.
This time, since we just verified that we don't need it, we're going to click on authorize, and voila, we have an Instagram access token. Now what's this going to be used for, you ask. Let me give you an example. So, let me login to another site so I can show you. All right, so what I have here is a dog soap company website that I've been working on for Shopify, and in this instance the theme has an Instagram feed. The difference though is this Instagram widget uses the Instagram access token as opposed to a login like some other ones do.
So, what we're going to do is we're going to take this Instagram access token here, we want to come over here and plug it in, and then here we're going to paste it in again. All right, so the first section we're pasting in the access token. Second one we're pasting in our user ID, which is up right here until the first dot. All right, so you have your client ID with the prefix of a user ID, and that's kind of how it's set up, all right?

You'll notice here that our client ID right there looks very similar to our access token, all right. Once we've plugged that in, I've got about 100 posts so it's weird, but you see right away that the Instagram feed picks up, I don't even have to do anything. I haven't even saved this yet, and it's already picked it up, all right?

So let me go back and reverse that. You should see Lazy Dog Soap there, yup. It's that fast, plug it in, it works. That's one example of how you would use this Instagram access token to run a feed on your store, all right? On a live site it will be like this, and of course I still have a password on here, stand by. All right, so here at the line of sight of lazydogsoap.com. Here at the bottom you'll see the Instagram feed, and when you hover over this you'll see your icons here for the carousel. This one doesn't have too many more posts, so it's going to keep wrapping them, all right?

That's pretty much it. It's a very simple process. You don't always need it, but if you ever need it for Shopify, you might need it Word Press, just depends on what you're using. I'm trying to dig up some plug ins to give you guys an example on when you would use this, but if you ever need it, here's how, all right? That's all I have for now, thanks and have a good day.

LET'S START

What's Next?

Are you ready to begin?

No problem! Schedule a call with us to get started on our journey together! 

"The first step in solving any problem is to recognize there is one." - Aaron Sorkin
BOOK A CALL

Need more time?

No problem! Honestly, it might never be the right time. 
We've got plenty of articles that discuss many of the topics that we'll talk about over the phone!
VIEW ARTICLES

Ready for Change?

We pride ourselves on helping clients grow their brands to reach the next level in business.
BOOK A CALL
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram