Created
October 21, 2021 08:14
-
-
Save akimabs/3a8865f9d0a6f80cb3c1a3bc272e5565 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const AdjustEventTrackerProperties = ({ event, parameter }: PropsAdjustEventParameter) => { | |
const adjustEventCode = AdjustEnum.properties[event]?.code ?? ''; | |
// console.log('event :', event) | |
// console.log('event code :', adjustEventCode) | |
let adjustEvent = new AdjustEvent(adjustEventCode); | |
parameter?.map(item => { | |
// console.log('event parameter key :', item.key) | |
// console.log('event parameter value :', item.value) | |
adjustEvent.addCallbackParameter(item.key, item.value); | |
}); | |
Adjust.trackEvent(adjustEvent); | |
}; | |
// Cara pakai | |
AdjustEventTrackerProperties({ | |
event: 'login_page', | |
parameter: [ | |
{ | |
key: 'input_cif', | |
value: decodeToken?.accountNo, | |
}, | |
{ | |
key: 'input_hijra_id', | |
value: username, | |
}, | |
], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment