How to know duration in site - asp.net

I have a .net web site(eg: www.mysite,com) and I use some external links in my site that redirect to other sites (like www.google.com). But how I know a user spend time in second site(ie www.google.com)

Assuming you have no control over the external website - you cannot.
You cannot inject your own client-side scripting into external website (well, sometimes you can, but it's XSS and it's bad).
Google Analytics tracks the activity of the users on a certain website because website owner included javascript code.
It may be possible for Google to track user's activity over multiple websites but only if those website display Google Ads. It is not bullet-proof since users can block ads.

Related

Google Site Kit Plugin has been copied to multiple sites, so Analytics information is inaccurate

My company manages several websites for clients. We build Wordpress sites and manage them all on Flywheel. Whenever we make a new website, we typically duplicate an existing site so that we can reuse some general settings. I recently found out that the Google Site Kit plugin has been getting duplicated, along with its existing settings, so that multiple separate websites have been pointing to the same google analytics account. Because they are all pointing to the same account, the Google Analytics account is just tracking slugs, thinking all traffic is coming from the same base url. Now all traffic on common pages, such as Home, Contact, and About are being clumped together, highly inflating the numbers of what traffic would be on any one of the sites. Is there a way to separate the data by base url, so I could see accurate data for each site?
In that case what you'll need to do on the sites with the same property is revisit the Site Kit settings and connect to the correct Google Analytics property (and Tag Manager / AdSense if applicable).
Note also that if your site URL changes Site Kit does recognize this, asking users to connect once more on the new domain. If you then connect on the new site you'll need to change the connected Google Analytics property.
Going forward, before you duplicate a site that has Site Kit active you can disconnect the Google Analytics, AdSense and Tag Manager modules before duplicating, before connecting once more after copying. Alternatively you can reset Site Kit before duplicating. Resetting will mean you'll need to connect all services once more (after duplicating).
Hopefully the above helps.

Wix template sending tracking via fileusr to my site - causing Google Analytics to view traffic as referral

My website is hosted on wix.com . Wix does not allow you to insert HTML code directly in the page of your web site. When I input HTML code, Wix inserts an iframe that is hosted from a different domain (filesusr.com). This iframe does not use Google Analytics tracking, so when the browser loads this iframe GA believes my customer has "left" my web site and gone somewhere else. When the iframe loads, the original source of the traffic is lost.
From the research I've done, it seems this Wix feature does not work with GA traffic tracking, and so there is no solution other than using a different hosting platform.
However, I'm sure you clever folk know otherwise!...
Right, Wix is notorious for being a "widget" based platform that does not play nice with custom code. However, the whole GA different-origin thing is such a common request that they implement the tracker directly themselves if you plug your GA ID into your site settings. Any reason you are not using this? - https://support.wix.com/en/article/adding-your-google-analytics-tracking-id-to-your-wix-site. They also claim to support other custom tracking snippets - make sure you are pasting it into the "Tracking & Analytics" section and not as a custom HTML widget.
If for some reason you can't or don't want to use the above methods, it used to be that you were just out of luck. There is a reason why Wix is not as favored as other platforms by digital marketers that need to implement tracking code. However, if you were really determined, you could probably implement a very custom GA tracker or any custom code through their new feature called Corvid, which exposes internal APIs and extra coding features. How to do so is beyond the scope of this question, but the postMessage() method is the normal way to pass messages from a parent to a child (iframe) container. Or you could use wix-fetch, which is an internal version of the web API fetch(), to manually send a hit request to GA.

Scraping user behavior in a specific web page

Let's say I want to go to a specific web page and track their users activity (for example get their location, how many times they logged on, the links they clicked etc..) Its is easy to implement this if it was my website, however I want to do it for any website.
Is it technologically doable? Do you have any idea how i can start to implement this?
If the website publicly (with or without authentication) gives Users data, you can do web scraping.
The data that you mentioned are the website stats which can be tracked only by the website or the Web server. Unless you have access to the server logs, you can't do it.

How can Google Analytics be used to track the different websites within a homegrown CMS?

I own and operate my own Content Management System (CMS) web application targeted at a specific type of customer (schools). Each customer wants to track the traffic to their own website. Of course, I could ask them to each create their own Google Analytics account and then provide me with the tracking ID so that my CMS can embed the correct code onto their pages. But I was wondering if there was a better way ... something more automated, and something that involves less work on their part.
I was thinking that for each customer, I could use the Google Analytics APIs to automatically create a new Property with the appropriate filter and then give the customer "Read & Analyze" permissions for that property. The problem with that is that I'm limited to creating 50 properties under my account.
Any other ideas? I'm just wondering if I'm missing some feature of GA that is specifically designed for this scenario.
Thanks,
Rajeev
Asking each user to create their own analytics account is the correct solution. Then they should just give your cms the id, and then your cms should include the correct analytics javascript code. It's the way all other cms systems supports Google Analytics

Google Analytic Tracking for an entire server?

We currently use google accounts for our site ibiblio.org. Setting up the tracking on our landing pages is no big deal. But, we have tons of "collections" on our server, which as a public service, we allow a ton of users to host their own website installs (usually wordpress or wikis). Here is an example of a collection
These installs exist on a server, each install is a subfolder. Is there a way we can track the activity of these subfolders (or installs) without having to inject tracking code into each of their HTML files? We have a lot of contributors, so injecting code could get messy.
Thanks so much for your time and help.
There are ways, depending on the server's programming language, to create google analytics requests every page load (i.e. whenever page requests are fired). Tracking an entire site is not possible if the HTML files are served statically, because GA wouldn't know a page load happened.

Resources