Skip to content

feat: analytics events view_item_list, select_item #1703

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

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

ivan-kalachikov
Copy link
Contributor

@ivan-kalachikov ivan-kalachikov commented Apr 23, 2025

@ivan-kalachikov ivan-kalachikov marked this pull request as ready for review April 23, 2025 15:26
@ivan-kalachikov ivan-kalachikov requested a review from a team as a code owner April 23, 2025 15:26
@ivan-kalachikov ivan-kalachikov requested review from Andrew-Orlov, goldenmaya and NaMax66 and removed request for a team April 23, 2025 15:26
@@ -381,26 +385,6 @@ watch(
},
{ immediate: true },
);

/**
* Send Google Analytics event for related products.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved into the related-products component

@@ -105,4 +108,9 @@ const { localizedItemsErrors, setErrors } = useErrorsTranslator<ValidationErrorT
const preparedLineItems = computed(() => prepareLineItems(props.items));

watchEffect(() => setErrors(validationErrors.value));

const handleLinkClick = (item: PreparedLineItemType) => {
const lineItem = props.items.find((i) => i.id === item.id);
Copy link
Collaborator

Choose a reason for hiding this comment

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

i looks strange. rename to smth else


watch(
relatedProducts,
() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's decide - do we pass parameters to the handler or look outside

viewItemList: [items: { code: string }[], params?: EventParamsType & ViewItemListParamsAdditionalType];
selectItem: [item: Product | LineItemType, params?: EventParamsType];
viewItemList: [items: { code: string }[], params?: EventParamsType & ListPropertiesType];
selectItem: [item: Product | LineItemType, params?: EventParamsType & ListPropertiesType];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you sure about the whole product fields(breadcrumbs, videos, outline, images...)? Lets just pick some and create new type in analytics

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to me that we even had a task for that, but I couldn't find(
Anyway, looks like it's out of scope of the current task and worth a separate one.
I made a note to not forget to discuss it.

@ivan-kalachikov ivan-kalachikov changed the title feat: analytics events view_item_list, view_item, select_item feat: analytics events view_item_list, select_item Apr 23, 2025
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