EN

@core / kit-dropshipping

1.0.1 ▾
verifiedMIT
GitHub

Dropshipping kit for Next.js: supplier import, margin rules, product landings, order forwarding and exceptions

Code10 filesContext~914 tokensscan passed

The exact tree that will be injected, after .genpmignore. Pinned to

src/app/(dropshipping)/_lib/purchase.tsread-only · a15c9c8
// Evento `purchase` de servidor (Meta CAPI, TikTok Events, GA4 MP) cuando Stripe confirma el pago, con la
// atribución y el consentimiento guardados al empezar el pago. Mismo eventId (id del pedido) que en el navegador.
import { purchaseEvent } from '@/lib/checkout';
import { onOrderEvent } from '@/lib/orders';
import { takeAttribution, trackServer } from '@/lib/pixels';

export function registerPurchaseTracking(): void {
  onOrderEvent('paid', 'dropshipping.purchase-pixel', async (order) => {
    // @core/checkout guarda en `cartId` el id de la sesión de Stripe (idempotencia del pedido).
    if (!order.cartId) return;
    const a = await takeAttribution(`checkout:${order.cartId}`);
    if (a) await trackServer(purchaseEvent(order), a);
  });
}
registerPurchaseTracking();

Report @core/kit-dropshipping

Sign in with GitHub to report a package.