Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📈 Add click logging for toolbar actions and include show mode in even… #326

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

FunamaYukina
Copy link
Member

@FunamaYukina FunamaYukina commented Dec 19, 2024

Summary

📈 Add click logging for toolbar actions and include show mode in event data.

Testing

element dataLayer
zoom
(-)
ss 2562
zoom
(+)
ss 2563
fitview ss 2566
tidyUp ss 2567
changeShowMode ss 2568 ss 2569 ss 2570

Other Information

Copy link
Member

@junkisai junkisai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize for the unclear design document. 🙏
I've left one comment about it.

Comment on lines 9 to 18
export const clickLogEvent = ({
element,
zoomLevel,
showMode,
}: ClickLogEvent) => {
pushToDataLayer({
event: 'click',
element,
zoomLevel,
showMode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the toolbar operations, since the design was to record the operations in a log called "toolbarAction", I would like you to create a separate function such as toolbarActionLogEvent(). 🙏

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize for the mistake😱.
I've revised the code, so please check it again🙏.
582ac0e

@FunamaYukina FunamaYukina force-pushed the add-custom-log-on-ToolBar branch from eca61e9 to 582ac0e Compare December 20, 2024 02:29
Copy link
Member

@junkisai junkisai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good!
I just want you to check the value to be specified for the event key. 🙏


const handleClick = useCallback(() => {
toolbarActionLogEvent({
element: 'fitview',
showMode: showMode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nits]

Suggested change
showMode: showMode,
showMode,

const handleClick = useCallback(() => {
toolbarActionLogEvent({
element: 'tidyUp',
showMode: showMode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nits]

Suggested change
showMode: showMode,
showMode,

toolbarActionLogEvent({
element: 'zoom',
zoomLevel: zoomLevel.toFixed(2),
showMode: showMode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nits]

Suggested change
showMode: showMode,
showMode,

toolbarActionLogEvent({
element: 'zoom',
zoomLevel: zoomLevel.toFixed(2),
showMode: showMode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nits]

Suggested change
showMode: showMode,
showMode,

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you🙏!
I've addressed all three of the points raised.↑
Fixed: 932ce82

showMode,
}: ToolbarActionLogEvent) => {
pushToDataLayer({
event: 'click',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to set the event in the toolbarActionLogEvent() function to 'toolbarAction'!

Suggested change
event: 'click',
event: 'toolbarAction',

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, Sorry...🙇‍♀️

Fixed: 932ce82

ss 2572

Copy link
Member

@junkisai junkisai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looked good! 🎉
Thank you for the corrections!

@junkisai junkisai added this pull request to the merge queue Dec 20, 2024
Merged via the queue into main with commit 91f3e0a Dec 20, 2024
12 checks passed
@junkisai junkisai deleted the add-custom-log-on-ToolBar branch December 20, 2024 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants