Skip to content

Changing or Removing My Google Analytics Code #1

@emptymalei

Description

@emptymalei

Hi @ZihanZhang-1996 ,

I hope everyone is doing well.

I am wondering if you could remove my google analytics code or change it to your own here:

code_website/mkdocs.yml

Lines 87 to 89 in 590e359

analytics:
provider: google
property: G-9XN0RGHSE1

Thanks a lot!

Why would I propose that?

I am quite honoured to have you using my repo structure and configs, however, it has been a bit convenient to me. Let me explain what happened.

This whole website is generated using mkdocs. In this file mkdocs.yaml, we have this following section defining the google analytics code.

code_website/mkdocs.yml

Lines 87 to 89 in 590e359

analytics:
provider: google
property: G-9XN0RGHSE1

Since this is "forked" from my repository here, the google analytics code (G-9XN0RGHSE1) remains the same as mine as you didn't change it.

**What is a Google Analytics Code**

I guess you know this google analytics thing. Just in case, it is a code that is provided by google analytics to track the users and clicks on the website.

When you build the website using mkdocs, the code will be injected into those html files. Here is one example:

Screenshot 2024-02-01 at 14 44 08

As a result, I am observing a lot of traffic from your website. For example,

Screenshot 2024-02-01 at 14 29 28

I take the first entry as an example: Here is your webpage: https://toneygroupcu.github.io/code_website/Tools/ewd/

This would not have bothered me so much if I could filter out your domain in my data, however, it seems that I can't. As a result, my daily dashboard becomes something like this:

Screenshot 2024-02-01 at 14 32 37

I hope you can understand why this baffling to me as I need to know the page views from my own website.

What you could do

I suggest you go to google analytics and get your own code. It is straightforward (see official documentation from mkdocs-material: https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-analytics/?h=google+an#google-analytics ).

Or you could simply remove it, then the cookie confirmation thing can also go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions