Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanna922 committed Mar 7, 2024
1 parent 7f56a57 commit 37afbe1
Showing 1 changed file with 22 additions and 55 deletions.
77 changes: 22 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

YLS는 숭실대학교 동아리 유어슈에서 사용하는 로깅 시스템입니다.

사용자의 로그는 local storage에 담기며, 로그가 10개 쌓였을 경우 또는 사용자가 이탈할 경우 백엔드 API를 호출해 로그를 전송합니다.
사용자의 로그는 local storage에 담기며, 로그가 10개 쌓였을 경우/사용자가 이탈할 경우 백엔드 API를 호출해 로그를 전송합니다.

사용자의 userId는 YLS 내에서 식별 불가능 한 값으로 처리됩니다.

Expand All @@ -26,30 +26,6 @@ userId는 사용처에서 넣어주어야 하며, version과 event 내부 필드

사용자가 진입한 화면을 추적합니다.

```tsx
export const Home = () => {
const router = useLocation();

return (
<>
<div className="card">
<LogScreen
params={{
userId: '',
version: 1,
event: {
name: 'view',
path: router.pathname,
screen: 'home',
},
}}
></LogScreen>
</div>
</>
);
};
```

### LogClick

사용자의 클릭(이벤트)를 추적합니다.
Expand All @@ -61,51 +37,42 @@ export const Home = () => {

return (
<>
<div className="card">
<LogScreen
<LogScreen
params={{
userId: 'test',
version: 1,
event: {
name: 'view',
path: router.pathname,
},
}}
>
<LogClick
params={{
userId: 'test',
version: 1,
event: {
name: 'view',
path: router.pathname,
name: 'click',
screen: 'home',
},
}}
>
<LogClick
params={{
userId: 'test',
version: 1,
event: {
name: 'click',
screen: 'home',
message: 'click button in home',
},
}}
>
<button
onClick={() =>
setCount((count) => {
count + 1;
})
}
>
count is {count}
</button>
</LogClick>
</LogScreen>
</div>
<button onClick={() => setCount((count) => count + 1)}>count is {count}</button>
</LogClick>
</LogScreen>
</>
);
};
```

## 📱 YLS를 사용하는 프로덕트
## YLS를 사용하는 프로덕트

[Soomsil-Web](https://github.com/yourssu/Soomsil-Web)

## 💻 타 버전 저장소
## 타 버전 저장소

[YLS-Android](https://github.com/yourssu/YLS-Android)

[YLS-Android](https://github.com/yourssu/YLS-Android)
[YLS-iOS](https://github.com/yourssu/YLS-iOS)

[YLS-Backend](https://github.com/yourssu/YLS-Backend)

0 comments on commit 37afbe1

Please sign in to comment.