Code Monkey home page Code Monkey logo

Comments (11)

kitian616 avatar kitian616 commented on July 23, 2024

I don't have your site and code, how can I solve your problem ?

from jekyll-text-theme.

RickJiangOnGitHub avatar RickJiangOnGitHub commented on July 23, 2024

不好意思,原諒我沒有附上code,因為我只有修改_config.yml的Google analytics ID的部分,其它是沒有修改的

## Google Analytics ##
ga_tracking_id: UA-******515-1

from jekyll-text-theme.

kitian616 avatar kitian616 commented on July 23, 2024

在使用 analytics 之前有一个判断,只有在非 development 的时候才会出现:

{%- if jekyll.environment != "development" -%}
   ...
{%- endif -%}

这是 demo 站点的编译脚本:

JEKYLL_ENV=production bundle exec jekyll build --config ./_config.demo.yml

你看看 JEKYLL_ENV 变量的值是否为 development。本地启动默认是 development, GitHub Page 默认是 production。

I'm writing some documents for TeXt Theme, 现有的文档介绍的不是很清晰。

from jekyll-text-theme.

RickJiangOnGitHub avatar RickJiangOnGitHub commented on July 23, 2024

感謝回覆,我有注意到這個判斷式,但我是直接clone您的git到本地端修改相關_config.yml內容後Push到
GitHub,並指向master branch 做為GitHub page,是否有可能是在GitHub Jekyll編譯啟動時造成的bug?
謝謝您

JEKYLL_ENV的變數與您是一模一樣的

from jekyll-text-theme.

kitian616 avatar kitian616 commented on July 23, 2024

不清楚,线索太少,没法判断。
GitHub 在编译的时候默认会把 JEKYLL_ENV 的值设置为 production 的。

from jekyll-text-theme.

ZeroneCat avatar ZeroneCat commented on July 23, 2024

遇到了同样的问题,cloudflare上有访问数据,但google analytics两天以来一直是0。之前还能看到访问信息…近期并没有对相关代码进行过修改。

设成了private,所以没有办法提供代码了,只是正好看到了这个issue就回复一下。

from jekyll-text-theme.

kitian616 avatar kitian616 commented on July 23, 2024

@ZeroneCat Strange, I found your site, and there is an error about googletagmanager.

Can't visit google analytic for a while. so I can't test ...

from jekyll-text-theme.

ZeroneCat avatar ZeroneCat commented on July 23, 2024

from jekyll-text-theme.

kitian616 avatar kitian616 commented on July 23, 2024

Oh, Many thanks @ZeroneCat .😄

from jekyll-text-theme.

pkayokay avatar pkayokay commented on July 23, 2024

@kitian616 has this been resolved? Not sure if this is supposed to work out of the box. I can't read the text above. 😭

from jekyll-text-theme.

RickJiangOnGitHub avatar RickJiangOnGitHub commented on July 23, 2024

@pkayokay My temporary solution is to move Google analytics script to base.html

from jekyll-text-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.