npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rundevelrun/free-visitor-counter

v1.1.2

Published

Free visitor counter component for React applications

Readme

@rundevelrun/free-visitor-counter

무료 방문자 카운터 React 컴포넌트입니다. 이 패키지는 free-visit-counter-api-dashboard를 활용하여 웹사이트의 방문자 수를 추적하고 표시합니다.

설치

npm install @rundevelrun/free-visitor-counter
# 또는
yarn add @rundevelrun/free-visitor-counter

사용법

기본 사용법

import { FreeVisitorCounter } from '@rundevelrun/free-visitor-counter';

function MyComponent() {
return (
<div>
<h1>내 웹사이트</h1>
<FreeVisitorCounter />
</div>
);
}

커스텀 스타일 적용

import { FreeVisitorCounter } from '@rundevelrun/free-visitor-counter';

function MyComponent() {
return (
<div>
<h1>내 웹사이트</h1>
<FreeVisitorCounter
totalCountPrefix="총 방문자: "
todayCountPrefix="오늘 방문자: "
separator=" | "
style={{
color: 'blue',
fontWeight: 'bold'
}}
/>
</div>
);
}

Gatsby에서 사용하기

import { FreeVisitorCounter } from '@rundevelrun/free-visitor-counter';

export default function IndexPage() {
return (
<main>
<h1>Gatsby 사이트</h1>
<FreeVisitorCounter
totalCountPrefix="총 방문자: "
todayCountPrefix="오늘 방문자: "
/>
</main>
);
}

데이터 로드 이벤트 처리

import { FreeVisitorCounter } from '@rundevelrun/free-visitor-counter';

function MyComponent() {
const handleCounterLoad = (data) => {
console.log('방문자 데이터:', data);
// 추가 로직 구현
};

return (
<div>
<h1>내 웹사이트</h1>
<FreeVisitorCounter
onLoad={handleCounterLoad}
/>
</div>
);
}

Props

| Prop | 타입 | 기본값 | 설명 | |------|------|--------|------| | totalCountPrefix | string | 'Total: ' | 총 방문자 수 앞에 표시할 텍스트 | | totalCountSuffix | string | '' | 총 방문자 수 뒤에 표시할 텍스트 | | todayCountPrefix | string | 'Today: ' | 오늘 방문자 수 앞에 표시할 텍스트 | | todayCountSuffix | string | '' | 오늘 방문자 수 뒤에 표시할 텍스트 | | separator | string | ' | ' | 총 방문자 수와 오늘 방문자 수 사이의 구분자 (줄바꿈은 '\n'으로 지정) | | showTotalFirst | boolean | true | true면 총 방문자 수를 먼저 표시, false면 오늘 방문자 수를 먼저 표시 | | style | object | {} | 컴포넌트에 적용할 인라인 스타일 | | className | string | '' | 컴포넌트에 적용할 CSS 클래스 | | onLoad | function | undefined | 방문자 데이터가 로드되었을 때 호출될 콜백 함수 |

작동 방식

이 컴포넌트는 페이지가 로드될 때 자동으로 방문자 카운터 API에 요청을 보냅니다. 요청에는 다음 정보가 포함됩니다:

  • 현재 도메인
  • 사용자의 타임존
  • 현재 페이지 경로
  • 현재 페이지 제목
  • 리퍼러 URL
  • 검색 엔진에서 온 경우 검색어

localhost 또는 127.0.0.1에서 테스트할 경우, API 요청을 보내지 않고 샘플 데이터를 반환합니다.

라이센스

MIT