ComputerScienceHouse / ComputerScienceHouse/gallery

Add Google Analytics

未关闭
#46 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
good first issue
主要语言
Python
星标
22
派生
30
平均合并
2 小时 26 分钟
30 天内合并 PR
1

描述

Add Google Analytics tracking

RTPs and Webmasters all have access to Google Analytics, it would be great to add additional sites to those stats so we can see what services are the most used within CSH.

Please ask an RTP or Webmaster for a tracking code and add the tracking to the site.

```

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-420696-9');

```

Additionally we can also add a tag to associate sessions with CSH accounts on services that require auth by adding:
```
gtag('set', {'user_id': 'matted'}); // Set the user ID using signed-in user_id
```

贡献指南

这个仓库没有索引到贡献指南

调研方向

未指定文件或测试。首先定位 gallery 网站的共享页面模板或入口点,然后从 RTP 或 Webmaster 处获取跟踪代码,并确定经过身份验证的服务是否会公开已登录用户的 ID。当网站包含 Google Analytics 跟踪,并且在适用的情况下,会话与 CSH 账户关联时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
analytics, web-dev
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。