li.shaoyi 5 mesiacov pred
rodič
commit
15e96f8c24
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/hooks/meta-pixel/index.ts

+ 1 - 1
src/hooks/meta-pixel/index.ts

@@ -54,7 +54,7 @@ export function useMetaPixel() {
     }
 
     // 跟踪自定义事件
-    const trackEvent = (eventName: 'Lead' | 'Purchase', parameters?: Record<string, any>) => {
+    const trackEvent = (eventName: 'Lead' | 'Purchase', parameters: Record<string, any> = {}) => {
         if (pixelId) {
             if (plus.hasPlus()) {
                 window.plus.bridge.exec('FacebookExpand', 'metaPixelFunction', [eventName, JSON.stringify(parameters)])