-
Notifications
You must be signed in to change notification settings - Fork 81
Release 5.0.7 fixes #3140
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
base: release-5.0.7
Are you sure you want to change the base?
Release 5.0.7 fixes #3140
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,37 +1,29 @@ | ||||||||||||||||||||||||||||||||||||||||
| {{ ibexa_tracking_track_event( | ||||||||||||||||||||||||||||||||||||||||
| 'visit', | ||||||||||||||||||||||||||||||||||||||||
| product, | ||||||||||||||||||||||||||||||||||||||||
| {}, | ||||||||||||||||||||||||||||||||||||||||
| '@App/tracking/custom_visit.html.twig' | ||||||||||||||||||||||||||||||||||||||||
| ) }} | ||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| {# templates/tracking/custom_visit.html.twig #} | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| {# | ||||||||||||||||||||||||||||||||||||||||
| # Custom visit tracking template | ||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||
| # Available variables: | ||||||||||||||||||||||||||||||||||||||||
| # - parameters: array of Raptor tracking parameters (p1, p2, p3, etc.) | ||||||||||||||||||||||||||||||||||||||||
| # - debug: boolean flag to enable debug console messages | ||||||||||||||||||||||||||||||||||||||||
| #} | ||||||||||||||||||||||||||||||||||||||||
| {# | ||||||||||||||||||||||||||||||||||||||||
| # Custom visit tracking template | ||||||||||||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||||||||||
| # Available variables: | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
| # - parameters: array of Raptor tracking parameters (p1, p2, p3, etc.) | ||||||||||||||||||||||||||||||||||||||||
| # - debug: boolean flag to enable debug console messages | ||||||||||||||||||||||||||||||||||||||||
| #} | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| <script type="text/javascript"> | ||||||||||||||||||||||||||||||||||||||||
| {% autoescape 'js' %} | ||||||||||||||||||||||||||||||||||||||||
| (function () { | ||||||||||||||||||||||||||||||||||||||||
| // Custom logic before tracking | ||||||||||||||||||||||||||||||||||||||||
| console.log('Custom visit tracking template'); | ||||||||||||||||||||||||||||||||||||||||
| console.log('Tracking parameters:', {{ parameters|json_encode|raw }}); | ||||||||||||||||||||||||||||||||||||||||
| <script type="text/javascript"> | ||||||||||||||||||||||||||||||||||||||||
| {% autoescape 'js' %} | ||||||||||||||||||||||||||||||||||||||||
| (function () { | ||||||||||||||||||||||||||||||||||||||||
| // Custom logic before tracking | ||||||||||||||||||||||||||||||||||||||||
| console.log('Custom visit tracking template'); | ||||||||||||||||||||||||||||||||||||||||
| console.log('Tracking parameters:', {{ parameters|json_encode|raw }}); | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+14
to
+16
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I understand correctly,
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "Custom templates" section needs a reminder of https://content.raptorservices.com/help-center/tracking-events-for-recommendation ressource There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the parameters variable should not be set in the template like that. When you call ibexa_tracking_track_event('visit', product, ...):
The template receives parameters already populated like: Important: The product object is NOT available in the template - only parameters and debug are passed. If you need to customize parameters, you can modify them (not replace):
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Get it! So we could remind that this is a received value. Even show that it could be edited:
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // Send the tracking event (REQUIRED for tracking to work) | ||||||||||||||||||||||||||||||||||||||||
| const event = 'trackEvent'; | ||||||||||||||||||||||||||||||||||||||||
| const params = {{ parameters|json_encode|raw }}; | ||||||||||||||||||||||||||||||||||||||||
| window.raptor.push(event, params); | ||||||||||||||||||||||||||||||||||||||||
| // Send the tracking event (REQUIRED for tracking to work) | ||||||||||||||||||||||||||||||||||||||||
| const event = 'trackEvent'; | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems this must not be confused with
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is indeed confusing and needs clarification.
For event tracking, the value should always be 'trackEvent' (Raptor API method). This shouldn't be changed unless you're calling a different Raptor API method. Your suggestion is good:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
| const params = {{ parameters|json_encode|raw }}; | ||||||||||||||||||||||||||||||||||||||||
| window.raptor.push(event, params); | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| // Custom logic after tracking | ||||||||||||||||||||||||||||||||||||||||
| {% if debug %} | ||||||||||||||||||||||||||||||||||||||||
| console.log('Visit event tracked successfully'); | ||||||||||||||||||||||||||||||||||||||||
| {% endif %} | ||||||||||||||||||||||||||||||||||||||||
| })(); | ||||||||||||||||||||||||||||||||||||||||
| {% endautoescape %} | ||||||||||||||||||||||||||||||||||||||||
| </script> | ||||||||||||||||||||||||||||||||||||||||
| // Custom logic after tracking | ||||||||||||||||||||||||||||||||||||||||
| {% if debug %} | ||||||||||||||||||||||||||||||||||||||||
| console.log('Visit event tracked successfully'); | ||||||||||||||||||||||||||||||||||||||||
| {% endif %} | ||||||||||||||||||||||||||||||||||||||||
| })(); | ||||||||||||||||||||||||||||||||||||||||
| {% endautoescape %} | ||||||||||||||||||||||||||||||||||||||||
| </script> | ||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,26 +157,26 @@ You can also change the default values globally. | |
| To do it, in `config/packages` folder, create a YAML file similar to this example: | ||
|
|
||
| ```yaml | ||
| ibexa_connector_gemini: | ||
| text_to_text: | ||
| models: | ||
| gemini-pro-latest: | ||
| label: 'Gemini Pro Latest' | ||
| max_tokens: 4096 | ||
| gemini-flash-latest: | ||
| label: 'Gemini Flash Latest' | ||
| max_tokens: 4096 | ||
| default_model: gemini-pro-latest | ||
| default_max_tokens: 4096 # Must be <= the model’s max_tokens | ||
| default_temperature: 0.8 | ||
| image_to_text: | ||
| models: | ||
| gemini-flash-latest: | ||
| label: 'Gemini Flash Latest' | ||
| max_tokens: 4096 | ||
| default_model: gemini-flash-latest | ||
| default_max_tokens: 4096 | ||
| default_temperature: 1.0 | ||
| ibexa_connector_gemini: | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed indent to make it easier to copy-paste this
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could be moved to a .yaml file |
||
| text_to_text: | ||
| models: | ||
| gemini-pro-latest: | ||
| label: 'Gemini Pro Latest' | ||
| max_tokens: 4096 | ||
| gemini-flash-latest: | ||
| label: 'Gemini Flash Latest' | ||
| max_tokens: 4096 | ||
| default_model: gemini-pro-latest | ||
| default_max_tokens: 4096 # Must be <= the model’s max_tokens | ||
| default_temperature: 0.8 | ||
| image_to_text: | ||
| models: | ||
| gemini-flash-latest: | ||
| label: 'Gemini Flash Latest' | ||
| max_tokens: 4096 | ||
| default_model: gemini-flash-latest | ||
| default_max_tokens: 4096 | ||
| default_temperature: 1.0 | ||
| ``` | ||
|
|
||
| When setting up models, make sure that you follow these rules: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,7 @@ ibexa_connector_quable: | |
| |-----------|--------------------------|-------------| | ||
| | `enabled` | `false` | Enables the connector. | | ||
| | `instance_url` | string | Base URL of your [[= pim_product_name =]] instance, for example `https://example.quable.com`. | | ||
| | `api_token` | string | [Read Access API token](https://docs.quable.com/v5-EN/docs/system-api-tokens) used to authenticate requests to [[= pim_product_name =]]. | | ||
| | `api_token` | string | [Read Access API token](https://docs.quable.com/v5-EN/docs/api-tokens) used to authenticate requests to [[= pim_product_name =]]. | | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quable changed their doc and link broke |
||
| | `channel_code` | string | Code of the [[[= pim_product_name =]] channel](https://docs.quable.com/v5-EN/docs/content-channels) used as the source of product data. | | ||
| | `webhook_secret` | string | Secret expected in the [webhook](https://docs.quable.com/v5-EN/docs/webhook) authorization header. | | ||
| | `language_map` | Empty | Maps [[= product_name =]] language codes (for example, `eng-GB`) to [[= pim_product_name =]] locale codes (for example, `en_GB`). For more information, see [Set up [[= pim_product_name =]] languages](/product_catalog/quable/install_quable.md) | | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| description: Quable API | ||
| description: Learn how to use PHP and REST APIs to retrieve product data from Quable | ||
|
Check failure on line 2 in docs/product_catalog/quable/quable_api.md
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preview looked wrong in the cards: |
||
| month_change: true | ||
| --- | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
| The `ibexa_tracking_script()` Twig function allows you to embed the main tracking script into the website. | ||
| It loads the initial script into `window.raptor`. | ||
| The script then enables event tracking, such as page visits, product views, or buys, from the front end. | ||
| It can be overridden in multiple ways to support custom implementations and to render code snippet through [[= product_name_base =]] in the [design engine](design_engine.md). | ||
| It can be overridden in multiple ways to support custom implementations and to render code snippet through [[= product_name =]] in the [design engine](design_engine.md). | ||
|
Check notice on line 15 in docs/templating/twig_function_reference/recommendations_twig_functions.md
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. product_name_base - Ibexa |
||
|
|
||
| Tracking can be conditionally initialized depending on cookie consent logic. | ||
| By default, for client-side use, the function returns a script, but it can return nothing when used server-side. | ||
|
|
@@ -58,7 +58,7 @@ | |
|
|
||
| The `ibexa_tracking_track_event()` function is responsible for sending event data to the service, which enables tracking of user interactions and behaviors. | ||
|
|
||
| Tracking is handled through a twig function that accept following parameters: | ||
| Tracking is handled through a Twig function that accept following parameters: | ||
|
Check notice on line 61 in docs/templating/twig_function_reference/recommendations_twig_functions.md
|
||
|
|
||
| ``` html+twig | ||
| ibexa_tracking_track_event( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ In addition to the [native functions provided by Twig](https://twig.symfony.com/ | |
| "templating/twig_function_reference/field_twig_functions", | ||
| "templating/twig_function_reference/page_twig_functions", | ||
| "templating/twig_function_reference/product_twig_functions", | ||
| "templating/twig_function_reference/recommendations_twig_functions", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was missing |
||
| "templating/twig_function_reference/site_context_twig_functions", | ||
| "templating/twig_function_reference/storefront_twig_functions", | ||
| "templating/twig_function_reference/icon_twig_functions", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was broken in https://ez-systems-developer-documentation--3134.com.readthedocs.build/en/3134/templating/twig_function_reference/recommendations_twig_functions/#custom-templates