We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1c0019 commit 2d92eeaCopy full SHA for 2d92eea
1 file changed
src/api/analytics.ts
@@ -1,9 +1,9 @@
1
import { event as gtEvent } from "nextjs-google-analytics";
2
3
-const sendEvent: typeof gtEvent = (...args) => {
+const sendEvent: typeof gtEvent = (actionName, options) => {
4
try {
5
- console.log(...args);
6
- gtEvent(...args);
+ if (options) options.event_name = actionName;
+ gtEvent(actionName, options);
7
} catch (error) {
8
console.warn(error);
9
}
0 commit comments