pinterest-conversions-client
v1.0.3
Published
A simple package to integrate Pinterest Tag.
Downloads
25
Readme
Pinterest Conversions Server & API
This package simplifies the integration of Pinterest's Conversion Tag for tracking conversion events. It includes tools for client-side event tracking (Pinterest Tag).
Installation
npm install pinterest-conversions-client
Features
- Pinterest Tag: Client-side event tracking via JavaScript.
- Test Environment Support: Send test events for validation.
Usage
1. Import and Initialize
import { PinterestTag } from "pinterest-conversions-client";
2. Pinterest Tag (Client-Side)
const pinterestTag = new PinterestTag("<PIXEL_ID>");
// Track an event
pinterestTag.track("custom_event", {
key: "value",
});
Development
Testing
- Run tests on pinterest page
Notes
- Ensure all sensitive data is hashed as required by Pinterest API.
- The server includes CORS support. Adjust allowed origins as needed for security.
License
MIT