Integrations

Works with everything you use

One script tag for most sites. NPM packages for React, Vue, and Angular. REST API for server-side. Under 2 minutes to set up.

HTML Snippet

Any website

Copy and paste one script tag. Works with any website, CMS, or static site.

html
<!-- Add before closing </head> tag -->
<script
  src="https://cdn.yalitrack.com/v1/yt.min.js"
  data-project="YOUR_PROJECT_ID"
  defer
></script>

React / Next.js

NPM package with hooks

First-class React support with hooks for page views, custom events, and user identification.

tsx
npm install @yalitrack/react

// app/layout.tsx (or _app.tsx)
import { YaliTrackProvider } from '@yalitrack/react';

export default function Layout({ children }) {
  return (
    <YaliTrackProvider projectId="YOUR_PROJECT_ID">
      {children}
    </YaliTrackProvider>
  );
}

// Any component
import { useYaliTrack } from '@yalitrack/react';

function CheckoutButton() {
  const { track } = useYaliTrack();
  return (
    <button onClick={() => track('checkout_started', {
      plan: 'pro', value: 39
    })}>
      Upgrade
    </button>
  );
}

Vue.js

Plugin & composables

Vue 3 plugin with composables for reactive tracking in any component.

vue
npm install @yalitrack/vue

// main.ts
import { createApp } from 'vue';
import { YaliTrackPlugin } from '@yalitrack/vue';

const app = createApp(App);
app.use(YaliTrackPlugin, {
  projectId: 'YOUR_PROJECT_ID',
});
app.mount('#app');

// Any component
<script setup>
import { useYaliTrack } from '@yalitrack/vue';
const { track } = useYaliTrack();

function onPurchase() {
  track('purchase', { amount: 49.99 });
}
</script>

Angular

Module & service

Angular module with injectable service for tracking throughout your application.

typescript
npm install @yalitrack/angular

// app.module.ts
import { YaliTrackModule } from '@yalitrack/angular';

@NgModule({
  imports: [
    YaliTrackModule.forRoot({
      projectId: 'YOUR_PROJECT_ID',
    }),
  ],
})
export class AppModule {}

// Any component
import { YaliTrackService } from '@yalitrack/angular';

@Component({ ... })
export class DashboardComponent {
  constructor(private yt: YaliTrackService) {}

  onAction() {
    this.yt.track('dashboard_action', {
      section: 'overview'
    });
  }
}

Vanilla JavaScript

No framework needed

Lightweight SDK that works anywhere JavaScript runs. No dependencies.

html
<script src="https://cdn.yalitrack.com/v1/yt.min.js"></script>
<script>
  yalitrack.init('YOUR_PROJECT_ID');

  // Auto-captures pageviews, clicks, scroll
  // Add custom events:
  yalitrack.track('signup_completed', {
    method: 'google',
    plan: 'free',
  });

  // Identify users:
  yalitrack.identify('user_123', {
    email: 'user@example.com',
    plan: 'pro',
  });
</script>

REST API

Server-side, any language

Send events from your backend in any language. Perfect for server-side tracking and webhooks.

bash
# Track an event
curl -X POST https://api.yalitrack.com/v1/events \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event": "subscription_renewed",
    "user_id": "user_123",
    "properties": {
      "plan": "pro",
      "mrr": 39.00,
      "period": "monthly"
    },
    "timestamp": "2026-03-18T12:00:00Z"
  }'

# Python example
import requests

requests.post("https://api.yalitrack.com/v1/events", json={
    "event": "invoice_paid",
    "user_id": "user_123",
    "properties": {"amount": 99.00}
}, headers={"Authorization": "Bearer YOUR_API_KEY"})

WordPress

Header snippet

Add the tracking snippet to your WordPress header. Works with any theme.

html
<!-- Add to Appearance > Theme Editor > header.php -->
<!-- Or use a "Header Scripts" plugin -->

<script
  src="https://cdn.yalitrack.com/v1/yt.min.js"
  data-project="YOUR_PROJECT_ID"
  defer
></script>

<!-- WooCommerce purchase tracking (optional) -->
<?php if (is_order_received_page()): ?>
<script>
  yalitrack.track('purchase', {
    order_id: '<?php echo $order->get_id(); ?>',
    total: <?php echo $order->get_total(); ?>
  });
</script>
<?php endif; ?>

Shopify

theme.liquid

Add to your Shopify theme for automatic e-commerce tracking including purchases.

html
<!-- Add to Online Store > Themes > Edit code > theme.liquid -->
<!-- Paste before closing </head> tag -->

<script
  src="https://cdn.yalitrack.com/v1/yt.min.js"
  data-project="YOUR_PROJECT_ID"
  defer
></script>

<!-- Auto-tracks: pageviews, product views, add to cart -->

<!-- Optional: Track purchases on thank-you page -->
<!-- Add to Settings > Checkout > Additional scripts: -->
<script>
  yalitrack.track('purchase', {
    order_id: '{{ order.order_number }}',
    total: {{ total_price | money_without_currency }},
    items: {{ order.line_items.size }}
  });
</script>

Don't see your framework?

The HTML snippet and REST API work with any platform. If you need a dedicated SDK, let us know and we'll build it.