li.shaoyi 5 kuukautta sitten
vanhempi
commit
15e96f8c24
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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)])