SBI! Internal Stats, Google Analytics, StatCounter and other traffic tracking systems. Discuss your traffic stats, and get help understanding them.

Moderator: Antoinette from Bedford

33% OFF The World’s Most Effective Web Business-Builder - Solo Build It!
#1380686 by Jeanita from Cornersville
Wed Sep 06, 2017 6:02 pm
Hello!

I have been working on this for over a week, thinking I can come up with the answer myself through the forums and online. Hasn't happened.

I have tried to place a filter to exclude my own traffic from GA. Nothing I've tried works. Does anyone have any suggestions?

It's such a new site that I thought about deleting the account and starting fresh, since traffic isn't much of an issue at this point.

Also, I don't know if it's worth mentioning, but when I set up GA, I used a wrong email (my email, just not the one I thought I had). I wouldn't think this would have anything to do with the filter. Just trying to make sure I hit on everything to relay it here.

Thanks for your time!
Last edited by Debs from SiteSell on Fri Sep 08, 2017 4:11 pm, edited 1 time in total. Reason: Moved from The Search Engines to here.
#1380804 by Jeanita from Cornersville
Fri Sep 08, 2017 4:47 pm
Debs, thank you soooo much!! That worked. I think I was added an IPv4, not an IPv6. I could have save myself a whole lot of time.

Have a super day!
#1381228 by Jeanita from Cornersville
Thu Sep 14, 2017 11:06 pm
Debs or anyone...
I'm having such a time getting my google analytics filter to stick. It works for one day, then the next day it goes off again. Here's the screenshot of what I'm entering. I'm putting my own IP (to my home) address.
Debs, I followed these instructions from the link you shared from another post, exactly from google (and saved it at the bottom):
https://support.google.com/analytics/answer/1034840?hl=en-GB&utm_id=ad

Any ideas at all? I don't have much hair left!
Thank you.
Attachments
GAblock.png
Screenshot GA
GAblock.png (7.93 KiB) Viewed 408 times
#1381642 by Debs from SiteSell
Tue Sep 19, 2017 3:45 pm
Jeanita, I'm sorry I was offline for a week after Irma went through Florida.

However, I've never done anything about filtering my own IP, so I can't help. I have asked a few others if they can, hopefully one of them knows and will jump in.

Debs
#1381644 by Jeanita from Cornersville
Tue Sep 19, 2017 3:51 pm
Okay, thank you Debs! I saw someone said you were dealing with Irma too. I'm so sorry! I hope you didn't sustain any damages. Glad to see you back here!

My best...
#1381667 by Juri from plainlight.com
Tue Sep 19, 2017 5:35 pm

The most reliable method would probably be exclusion based on GA's own User Id. Alas, Google wouldn't allow doing this.

If you live in a small community, you can try to exclude traffic from it. To do this:

1. Connect to your site and log in to your GA account.
2. In GA, you should be able to locate your own session under Real Time/Locations. Drill down into your country, down to city -- this can be one in your vicinity, not exactly your own. [When I connect from my home, Google usually maps me to Frankfurt.]
3. Having done this, create a custom filter based on City set to what Google thinks you connect from. Of course, if this is something like NYC, London, or Sydney, it would exclude much more people, not only you.

I usually avoid connecting to my site directly, if possible. Instead, I preview my live pages from the BlockBuilder. To exclude this traffic coming from sitesell.com, I use a script which prevents generating GA traffic from domains other than my own:

Code: Select all<script>
if (/fatrek\.com/i.test(location.hostname)) {
// your GA code goes here
}
</script>

You can copy it and use on your site -- it is already set up for [Domain Private]. Just put the inside of your GA code without its <script> tags in place of the comment.

Kind regards,
J.
#1381682 by Jeanita from Cornersville
Tue Sep 19, 2017 6:50 pm
Hi Juri.

The custom block for city works great. Thanks.

As far as the code you provided for me, I don't really know HTML. I went to GA to get my tracking code (under the .js tracking code link), which is this:

<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-104390925-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());

gtag('config', 'UA-104390925-1');
</script>

I'm not sure where to put your code for me in GA's code.

I can't wait to begin learning HTML, it'll make it so much easier for me to understand!

I do appreciate your time.

Thanks again!
#1381685 by Jeanita from Cornersville
Tue Sep 19, 2017 7:13 pm
Okay, so I did a little research on what site tags are/look like. So is this the way it's supposed to be?

<script>
if (/fatrek\.com/i.test(location.hostname)) {
// window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());

gtag('config', 'UA-104390925-1');
}
</script>

I'll wait for your reply :wink:
Thanks!
#1381701 by Juri from plainlight.com
Tue Sep 19, 2017 10:36 pm

Hi Jeanita,

If your city filter works, don't mess with the script. Yours looks quite different from mine, probably because it's from a different source base (tag manager, which I don't use).

So, please change it back to what it was:

Code: Select all<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-104390925-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());

gtag('config', 'UA-104390925-1');
</script>


What's now there is already wrong: Google's code doesn't load at all, and it has errors! Replace the following


<script>function gtag(){dataLayer.push(arguments)}/fatrek\.com/i.test(location.hostname)&&(gtag("js",new Date),gtag("config","UA-104390925-1"))</script>


with the code above.

Kind regards,
J.
Last edited by Juri from plainlight.com on Tue Sep 19, 2017 10:41 pm, edited 1 time in total.
#1381705 by Jeanita from Cornersville
Tue Sep 19, 2017 10:56 pm
I realized the code from google was the tag manager code. Here is the actual analytics code:

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-104390925-1', 'auto');
ga('send', 'pageview');

</script>
(in immediately after the opening <body> tag)
<?php include_once("analyticstracking.php") ?>


The filter with the city still seems to be working. Should I just enter the regular GA code in the head? Or do I still need to add something to it?

Also, before I enter it in the head, is it okay to use the google HTML minifier tool?
Similar Topics Statistics Last post
Google Analytics isn't paying attention to my filters...Help!
by Theona from Maple Shade Sat Dec 24, 2016 10:54 am
5 Replies
880 Views
by Juri from plainlight.com
Wed Jan 04, 2017 8:41 pm
How to Set Up a Tracking Link in GA?
by Dee from Cape Cod Wed Apr 26, 2017 8:12 pm
11 Replies
750 Views
by Dee from Cape Cod
Sat Apr 29, 2017 2:58 am

Users browsing this forum: No registered users and 3 guests