analytics, url forwarding continue tracking old site - google-analytics

I rebranded my website and changed the domain name, I setup a forward at my web host.
So for example www.myoldsite.com forwards to www.mynewsite.com
In Google Analytics www.myoldsite.com is still getting lots of sessions, and www.mynewsite.com isn't, I don't understand why!

Related

Firebase hosting redirect http to https in custom domain

I hosted a website in firebase hosting and connected a custom domain, the domain is connected properly as you can see in the screenshot.
firebase hosting screenshot
The problem is if someone for the first time in their browsing session writes http://plucreo.com it does not get redirect to https://plucreo.com and the connection gets timed out. This does not happen with the default domain http://plucreo.web.app it redirects to https:// one correctly.
But, if you manually type https://plucreo.com in address bar, for the current browsing session http://plucreo.com starts correctly redirecting to https:// one.
How to fix this redirecting issue?

Firebase SSL and Subdomains

So I was using Google cloud buckets to host my site, I figured out SSL Is impossible doing that so I tried app engine and that just got really complicated really fast so I tried firebase and it seems the best, however I have my main site (https://example.com) and my development build of the site with an auth login for me and my devs (https://staging.example.com). I have 2 different firebase projects one for the main site and another for the subdomain, however I first connected the subdomain one and it got an SSL cert and said connected in like 2 seconds, however I did the same for my main site and it's been stuck on pending all day now. I read somewhere that it can't do a subdomain and a normal site because of some SNI thing but if you can't enable SSL on a domain and a subdomain that's a pretty bad system imo. I use Google Domains for my domain and there are A records for the normal domain and subdomain pointing to firebase.
Thanks to anyone with any clarification.
Turns out I just had to wait for the certificate to be made, I was just confused as to why one domain took seconds to make it and the subdomain took almost a day so I thought something was wrong.

Am I being hacked? Google Analytics shows PHP scripts as referrers

Google Analytics recently started showing PHP scripts as referrers to my website, for example:
localhost/index.php
EDIT: This is a recent surge in activity coming from India. It is not coming from our own services, such as our web host, or a backup service. It is also coinciding with spam users on my websites from India, so I know this is intentionally malicious behavior.
Any suggestions on how to investigate further and prevent it? We are running on Django, hosted on AWS, if that helps.
If the server have subnet or the server is on your system it may cause that kind of referrers if request from the subnet.
Well, In case of Django if somebody from your team is running a development version of your application with the Google Analytics tracking code, then things like this can show up. Not only will localhost show up in your Referrers, but your aggregate metrics like Bounce Rate, Time On Site, Conversion, and others will be incorrect because the unusual behavior of a developer's will be mixed in with that of normal users and skew our results. There are basically 3 steps to fix it :
Add a Google Analytics exclusion filter
1) Open Google Analytics and choose your property view.
2) Navigate to Admin.
3) Click on Filters under the View column.
4) Click on New Filter.
5) Create a new "Predefined filter" which excludes traffic to the "localhost" hostname.
Edit: Configure ALLOWED_HOSTS in Django settings
This is a security measure to prevent an attacker from poisoning caches and password reset emails with links to malicious hosts by submitting requests with a fake HTTP Host header, which is possible even under many seemingly-safe web server configurations. Django 1.5 introduced the allowed hosts setting that is required for security reasons. A settings file created with Django 1.5 has this new section which you need to add:
ALLOWED_HOSTS = [
'.example.com', # Allow domain and subdomains
'.example.com.', # Also allow FQDN and subdomains
]
Add your host here like ['www.antodominic.com'] or ['*'] for a quick test, but don't use ['*'] for production.
Hope this helps ...!!
Cheers.. :)
If you have a website that is externally accessible, then yes- someone is trying to hack your website... and every other website in existence. It's a fact of life.
Your localhost referrer is not necessarily indicative of malicious behavior, however. It's more likely that your dev instance, or someone else's dev instance of their site with links to your site, is creating the entries in your analytics.
However, if it's a referer with a link to another site in the querystring, then what you're falling victim to is referer spam attempts. If you want to prevent them, you can block them via htaccess if you're running on Apache, or via web.config if you're running on IIS. Just replace the pertinent bits regular expressions, or better yet, add to them.

Using Website IP address to set up Google Analytics

Trying to set up Google analytics tracking on my site. Right now it's in QA phase, site is not officially launched with vanity URL yet. So we are using Site IP address to enter in web property URL.
However, we do not get any data in GA, I wonder if it';s because we are using IP rather than url.
I see a post asking the same question but no answers yet: Google Analytics - IP Address as Website URL

Does Google Analytics track the traffic of multiple domains?

I have a website subdomain.domain.com. I created an analytics account for this and included the tracking code. Later I registered a new domain xyz.com and pointed to the same website subdomain.domain.com. In Google analytics report, will the analytics display the traffic from both domains or do I need to make some alterations?
Google Analytics tracks website traffic no matter what hostname is specified in the page URL. You can use the Hostname dimension in the content report to find out.
In your case, depending on the type of hostname redirection you may or may not see the xyz.com in your reports. When you navigate to the xyz.com in browser, pick any page and can see in your browser xyz.com - it will be tracked. If you can see subdomain.domain.com - the last will be tracked.
If you website is accessible via subdomain.domain.com and xyz.com - you may have an issue with cross-domain users and duplicated (inflated count of) users since GA cookie in a browser is set per hostname
I have the same situation where our URL has changed and we are now in a crossover period while both URLs are active.
Without changing the tracking code I am getting our stats as before but I cannot tell in the analytics reports which URL the visitor used to access the site. If that is not of concern to you then you don't need to update your tracking code.
There is a secondary dimension under Content called "Hostname", this will break out your traffic by whether or not it was visited from subdomain.domain.com or xyz.com

Resources