IBX-10701: ibexa_tracking_script function described in Dev-doc#3105
IBX-10701: ibexa_tracking_script function described in Dev-doc#3105julitafalcondusza wants to merge 4 commits into5.0from
ibexa_tracking_script function described in Dev-doc#3105Conversation
Preview of modified filesPreview of modified Markdown: |
|
| It can be overridden in multiple ways to support custom implementations and to render code snippet through [[= product_name_base =]] Design Engine. | ||
|
|
||
| Tracking can be conditionally initialized depending on cookie consent logic. | ||
| By default, the function returns the script for client-side use, while it can return nothing when used server-side. |
There was a problem hiding this comment.
I don't understand this sentence - I thought this function is for website (frontend) tracking, not sure what is meant here when mentioning server-side.
There was a problem hiding this comment.
I don't understand this sentence - I thought this function is for website (frontend) tracking, not sure what is meant here when mentioning server-side.
@mnocon that was initially the case, which during QA proved to have very bad DX. Essentially, it would require Partner to implement custom event subscribers to perform server-side tracking. The current idea is that you transparently use both Twig functions in your templates: ibexa_tracking_script and ibexa_tracking_track_event which behaves differently depending if you configured server-side or client.
To answer the first question that might pop up - why can't we implement subscribers ourselves? In some cases - like during buy process - yes, but in general loading items does not yield tracking action - only the request to display item(s) does. Which are done via custom templates, hence default implementation is hard to provide otherwise.
There was a problem hiding this comment.
Ok, I see that this topic is explained a bit in https://github.com/ibexa/documentation-developer/pull/3110/changes, which I haven't reviewed yet - that's why I'm missing some context.
I'm discussing right now with Julita if these 2 pages should be mentioned together, because the explanation just in this PR is not clear for me
adriendupuis
left a comment
There was a problem hiding this comment.
"LTS Update" and "New" pills.



ibexa_tracking_scriptfunction described in Dev-doc.Checklist