genrank
Version:
AI-powered visitor tracking and analytics for Generative Engine Optimization (GEO). Track and analyze how AI search engines and LLMs interact with your content.
91 lines (68 loc) • 2.85 kB
Markdown
# GenRank
A specialized package to track and analyze AI-powered search engine and bot visitors on your website. This data is crucial for Generative Engine Optimization (GEO) strategies, helping you understand how AI models and search engines interact with your content.
## What is Generative Engine Optimization (GEO)?
As AI-powered search engines like Google SGE, ChatGPT, Perplexity, and Claude become increasingly popular, traditional SEO strategies are no longer sufficient. GEO represents the evolution of search optimization for this new AI-driven landscape.
GEO is a set of strategies designed to optimize content for AI-powered search engines and Large Language Models (LLMs). Unlike traditional SEO that focuses on keywords and backlinks, GEO prioritizes comprehensive, factually accurate, and authoritative content that AI models can easily understand and reference.
## Installation
```bash
npm install genrank
```
## Usage
### Browser
```html
<!-- Load axios first -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<!-- Then load the tracker -->
<script src="https://unpkg.com/genrank/dist/index.js"></script>
<script>
// Initialize the tracker with your API key
const tracker = new VisitorTracker('your-api-key-here');
// Track the current page visit
tracker.trackVisit()
.then(() => console.log('Visit tracked successfully'))
.catch(error => console.error('Failed to track visit:', error));
</script>
```
### Node.js / TypeScript
```typescript
import { VisitorTracker } from 'genrank';
// Initialize the tracker with your API key
const tracker = new VisitorTracker('your-api-key-here');
// Track a visit
tracker.trackVisit()
.then(response => console.log('Visit tracked:', response))
.catch(error => console.error('Failed to track visit:', error));
```
## Features
- Automatically detects and tracks:
- AI-powered search engines (Google SGE, ChatGPT, Perplexity, Claude)
- Traditional search engine crawlers
- Other bot traffic
- Human visitors
- Captures essential data:
- Timestamp
- User Agent (automatically detected from browser or Node.js environment)
- Referrer URL (automatically detected from browser)
- Current Page URL (automatically detected from browser or Node.js environment)
- TypeScript support
- Works in both browser and Node.js environments
- Simple API - just call trackVisit()
- Error handling
- Detailed logging
- Secure API key authentication
## Analytics Dashboard
Track and visualize your visitor data at [genrank.app](https://genrank.app). The dashboard provides:
- Real-time visitor analytics
- AI/bot traffic patterns
- Content engagement metrics
- GEO optimization insights
- Custom reports and visualizations
## Development
```bash
# Install dependencies
npm install
# Build the package
npm run build
```
## License
ISC