This documentation is for a version that has reached its End Of Life. Such versions are no longer supported and don't receive security updates. Consider updating to a newer version.
Raptor tracking functions¶
Raptor tracking functions introduce visit tracking functionality for collecting user interactions with products and content. The implementation includes product visit tracking with mapping to tracking parameters, as well as Twig functions for straightforward integration.
Raptor integration introduces two Twig functions:
ibexa_tracking_script()- allows you to embed main tracking script into the website.ibexa_tracking_track_event()- is responsible for sending event data to the service, enabling tracking of user interactions and behaviors.
Embed tracking script¶
To enable tracking, tracking script must be embedded into the website’s layout.
To embed tracking script, add the twig function ibexa_tracking_script() into the
pagelayout.html.twig:
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
- server - returns HTML comments, placeholders that do not perform any action. Instead, the tracking is done server-side.
- client - returns
scripttags to load the tracking script in the browser.
You can switch tracking mode anytime by changing the tracking_type parameter.
For more information on Tracking modes, see Raptor documentation: