Skip to content

Commit a64c89d

Browse files
author
Paulo Junior
committed
fix: gtm datalayer props v1
1 parent 3cf77a6 commit a64c89d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/utils/addCustomEventListener.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,20 @@ export const addCustomClickEventListener = (eventName: string) => {
3434
'elementUrl': targetElement.href || targetElement.action || '',
3535
'elementURL': targetElement.href || targetElement.action || '',
3636
elementTarget: targetElement.target || '',
37+
clickUrl: targetElement.href || targetElement.action || '',
38+
clickURL: targetElement.href || targetElement.action || '',
3739
elementText: targetElement.textContent || '',
3840
originalEvent: event,
3941
inShadowDom: shadowFound,
4042
},
43+
custom_event: {
44+
clickUrl: targetElement.href || targetElement.action || '',
45+
clickURL: targetElement.href || targetElement.action || '',
46+
'elementUrl': targetElement.href || targetElement.action || '',
47+
'elementURL': targetElement.href || targetElement.action || '',
48+
elementTarget: targetElement.target || '',
49+
elementText: targetElement.textContent || '',
50+
}
4151
})
4252
}
4353
}

0 commit comments

Comments
 (0)