
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
nestjs-posthog
Advanced tools
Lightweight library to use Posthog in NestJS applications.
Quick Start Guide
·
Request Feature
·
Report Bug
Posthog for Nestjs makes it easier to implement analytics with Posthog into your Nestjs application.
▶ yarn add nestjs-posthog
import { Module } from '@nestjs/common';
import { PosthogModule } from 'nestjs-posthog';
@Module({
imports: [
PosthogModule.forRoot({
apiKey: '<ph_project_api_key>',
options: {
host: '<ph_instance_address>',
},
}),
],
})
export class AppModule {}
You can easily inject PosthogService
to be used in your services, controllers,
etc.
import { Injectable } from '@nestjs/common';
import { PosthogService } from 'nestjs-posthog';
@Injectable()
export class AuthService {
constructor(private service: PosthogService) {}
helloWorldMethod() {
this.service.capture({
distinctId: 'distinct id',
event: 'movie played',
properties: {
movieId: '123',
category: 'romcom',
},
});
return 'hello world';
}
}
Read more about the methods in Posthogs Node.js client documentation.
We love to get help 🙏 Read more about how to get started in CONTRIBUTING 🌳
This is a community-driven Open Source project with no ties with Posthog. It's supported on a volunteer-basis, but frequently used in commerical projects.
FAQs
```shell ▶ yarn add nestjs-posthog ```
The npm package nestjs-posthog receives a total of 46 weekly downloads. As such, nestjs-posthog popularity was classified as not popular.
We found that nestjs-posthog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.