How to include Google Analytics in an RMarkdown generated GitHub Page?

后端 未结 2 1282
星月不相逢
星月不相逢 2021-01-02 01:35

How can I always include the Google Analytics tacking code on my GitHub Pages webpage generated with R Markdown?

I am currently creating a webpage hosted on GitHub P

2条回答
  •  长发绾君心
    2021-01-02 02:14

    I manually write the header in the same RMarkdown file and simply include the Google Analytics chunk. This header goes immediately after the yaml. Works like a charm.

    ---
    title: "XXXXXXXXXX"
    author: "XXXXXXXXXXX"
    date: "`r Sys.Date()`"
    ---
    
    
    
    
    
     
    

提交回复
热议问题