medusa-storefront-analytics 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/meta-event.d.ts +19 -0
- package/dist/index.d.ts +2 -0
- package/dist/ui-library.js +4861 -290
- package/dist/ui-library.umd.cjs +41 -1
- package/package.json +66 -64
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
export type MetaCapiEventBody = {
|
|
4
|
+
event_name?: string;
|
|
5
|
+
event?: string;
|
|
6
|
+
action_source?: string;
|
|
7
|
+
event_source_url?: string;
|
|
8
|
+
event_id?: string;
|
|
9
|
+
custom_data?: Record<string, unknown>;
|
|
10
|
+
user_data?: Record<string, unknown>;
|
|
11
|
+
};
|
|
12
|
+
/** Next.js App Router handler for `POST /api/meta/event` (Meta Conversions API). */
|
|
13
|
+
export declare function POST(req: NextRequest): Promise<NextResponse<{
|
|
14
|
+
success: boolean;
|
|
15
|
+
data: any;
|
|
16
|
+
}> | NextResponse<{
|
|
17
|
+
success: boolean;
|
|
18
|
+
error: any;
|
|
19
|
+
}>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,4 +7,6 @@ export { emitContactFormSubmitted, emitFormSubmitted, emitLeadCaptured, } from '
|
|
|
7
7
|
export { META_STANDARD_EVENTS, type EcommercePayload, type GA4Item, type MetaStandardEventName, } from './events/meta-events';
|
|
8
8
|
export { META_PIXEL_DATALAYER_EVENT, fireMetaPixelEvent, fireMetaEcommerceEvent, fireMetaPurchase, } from './providers/meta-pixel';
|
|
9
9
|
export { META_EXPLICIT_KEY, disableMetaPixelAutoConfig, installMetaPixelGuard, } from './providers/meta-pixel-guard';
|
|
10
|
+
export { POST as metaCapiEventHandler } from './api/meta-event';
|
|
11
|
+
export type { MetaCapiEventBody } from './api/meta-event';
|
|
10
12
|
export { cartToEcommercePayload, markInitiateCheckoutFired, trackAddPaymentInfo, trackAddShippingInfo, trackAddToCart, trackAddToWishlist, trackBeginCheckout, trackCartNavClick, trackCompleteRegistration, trackContact, trackHeroCtaClick, trackInitiateCheckoutFromCart, trackLead, trackMetaStandardEvent, trackPurchase, trackRemoveFromCart, trackSearch, trackViewCart, trackViewItem, trackViewItemList, wasInitiateCheckoutFired, } from './ecommerce/ga4-ecommerce';
|