IBX-11100: Hybrid tracking described in Dev-doc by julitafalcondusza · Pull Request #3250 · ibexa/documentation-developer · GitHub
Skip to content

IBX-11100: Hybrid tracking described in Dev-doc#3250

Open
julitafalcondusza wants to merge 7 commits into
5.0from
IBX-11100
Open

IBX-11100: Hybrid tracking described in Dev-doc#3250
julitafalcondusza wants to merge 7 commits into
5.0from
IBX-11100

Conversation

@julitafalcondusza

@julitafalcondusza julitafalcondusza commented Jun 23, 2026

Copy link
Copy Markdown
Contributor
Question Answer
JIRA Ticket (https://github.com/ibexa/connector-raptor/pull/59)
Versions 5.0
Edition all

Hybrid tracking described in Dev-doc

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

@julitafalcondusza julitafalcondusza marked this pull request as ready for review June 25, 2026 10:38
Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md

@mnocon mnocon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hybrid tracking must be mentioned in other places, it's not enough to describe it just in a separate article - right now it feels disconnected from other parts of the doc.

Examples:

tracking_type: hybrid must be mentioned, in the YAML and in the list

hybrid_tracking_proxy_path should be mentioned in the global configuration reference?

The function output must be expanded to mention the hybrid type

Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md Outdated
Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md Outdated
Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md Outdated
Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md Outdated
Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md Outdated
Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md Outdated
Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md Outdated
Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md Outdated
Comment thread docs/recommendations/raptor_integration/hybrid_tracking.md Outdated
@julitafalcondusza julitafalcondusza requested a review from mnocon June 29, 2026 10:56
@github-actions

Copy link
Copy Markdown

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/recommendations/config/packages/ibexa_connector_raptor.yaml

docs/recommendations/raptor_integration/connector_installation_configuration.md@28:``` yaml
docs/recommendations/raptor_integration/connector_installation_configuration.md@29:[[= include_file('code_samples/recommendations/config/packages/ibexa_connector_raptor.yaml', 0, 17) =]]
docs/recommendations/raptor_integration/connector_installation_configuration.md@30:```

001⫶ibexa:
002⫶ system:
003⫶ <scope>:
004⫶ connector_raptor:
005⫶ enabled: true
006⫶ customer_id: ~ # Required

code_samples/recommendations/config/packages/ibexa_connector_raptor.yaml

docs/recommendations/raptor_integration/connector_installation_configuration.md@28:``` yaml
docs/recommendations/raptor_integration/connector_installation_configuration.md@29:[[= include_file('code_samples/recommendations/config/packages/ibexa_connector_raptor.yaml', 0, 17) =]]
docs/recommendations/raptor_integration/connector_installation_configuration.md@30:```

001⫶ibexa:
002⫶ system:
003⫶ <scope>:
004⫶ connector_raptor:
005⫶ enabled: true
006⫶ customer_id: ~ # Required
007⫶                tracking_type:        client # One of: "client" or "server"
007⫶                tracking_type:        client # One of: "client", "server", or "hybrid"
008⫶
009⫶ # Raptor Recommendations API key
010⫶ recommendations_api_key: ~ # Required
011⫶
012⫶ # Raptor Recommendations API URL, optional, set by default
013⫶ recommendations_api_url: '%ibexa.connector.raptor.recommendations.api_url%'
014⫶
015⫶ # Cookie lifetime in days for server-side tracking identifier
016⫶ # Default: 365 days. Minimum: 1 day.
017⫶ cookie_id_lifetime_days: 365

008⫶
009⫶ # Raptor Recommendations API key
010⫶ recommendations_api_key: ~ # Required
011⫶
012⫶ # Raptor Recommendations API URL, optional, set by default
013⫶ recommendations_api_url: '%ibexa.connector.raptor.recommendations.api_url%'
014⫶
015⫶ # Cookie lifetime in days for server-side tracking identifier
016⫶ # Default: 365 days. Minimum: 1 day.
017⫶ cookie_id_lifetime_days: 365

docs/recommendations/raptor_integration/connector_installation_configuration.md@77:``` yaml hl_lines="18-20"
docs/recommendations/raptor_integration/connector_installation_configuration.md@78:[[= include_file('code_samples/recommendations/config/packages/ibexa_connector_raptor.yaml') =]]
docs/recommendations/raptor_integration/connector_installation_configuration.md@79:```
docs/recommendations/raptor_integration/connector_installation_configuration.md@80:``` yaml hl_lines="18-21"
docs/recommendations/raptor_integration/connector_installation_configuration.md@81:[[= include_file('code_samples/recommendations/config/packages/ibexa_connector_raptor.yaml') =]]
docs/recommendations/raptor_integration/connector_installation_configuration.md@82:```

001⫶ibexa:
002⫶ system:
003⫶ <scope>:
004⫶ connector_raptor:
005⫶ enabled: true
006⫶ customer_id: ~ # Required

001⫶ibexa:
002⫶ system:
003⫶ <scope>:
004⫶ connector_raptor:
005⫶ enabled: true
006⫶ customer_id: ~ # Required
007⫶                tracking_type:        client # One of: "client" or "server"
007⫶                tracking_type:        client # One of: "client", "server", or "hybrid"
008⫶
009⫶ # Raptor Recommendations API key
010⫶ recommendations_api_key: ~ # Required
011⫶
012⫶ # Raptor Recommendations API URL, optional, set by default
013⫶ recommendations_api_url: '%ibexa.connector.raptor.recommendations.api_url%'
014⫶
015⫶ # Cookie lifetime in days for server-side tracking identifier
016⫶ # Default: 365 days. Minimum: 1 day.
017⫶ cookie_id_lifetime_days: 365
018❇️ibexa_connector_raptor:
019❇️ # When enabled, tracking exceptions are thrown instead of being silently handled
020❇️ strict_exceptions: true
008⫶
009⫶ # Raptor Recommendations API key
010⫶ recommendations_api_key: ~ # Required
011⫶
012⫶ # Raptor Recommendations API URL, optional, set by default
013⫶ recommendations_api_url: '%ibexa.connector.raptor.recommendations.api_url%'
014⫶
015⫶ # Cookie lifetime in days for server-side tracking identifier
016⫶ # Default: 365 days. Minimum: 1 day.
017⫶ cookie_id_lifetime_days: 365
018❇️ibexa_connector_raptor:
019❇️ # When enabled, tracking exceptions are thrown instead of being silently handled
020❇️ strict_exceptions: true
021❇️    hybrid_tracking_proxy_path: '/track'


Download colorized diff

@mnocon mnocon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ibexa_connector_raptor:
# When enabled, tracking exceptions are thrown instead of being silently handled
strict_exceptions: true
hybrid_tracking_proxy_path: '/track'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
hybrid_tracking_proxy_path: '/track'
hybrid_tracking_proxy_path: '/raptor/track'

I don't think a lot of people will customize this, let's just use the default value here


- `strict_exceptions` – when enabled, tracking exceptions are thrown instead of being silently handled. Default value: `%kernel.debug%`.

- `hybrid_tracking_proxy_path` - by default, it's set to `/raptor/track`, the client side shim sends tracking events to this same-origin endpoint, which forwards them to Raptor asynchronously.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- `hybrid_tracking_proxy_path` - by default, it's set to `/raptor/track`, the client side shim sends tracking events to this same-origin endpoint, which forwards them to Raptor asynchronously.
- `hybrid_tracking_proxy_path` - by default, it's set to `/raptor/track`. The client side shim sends tracking events to this same-origin endpoint, which forwards them to Raptor asynchronously.

- `tracking_type` - defines how user events are sent to the tracking API. Default value: `client`. Possible values:
- `client` - tracking is executed in the browser using JavaScript snippets generated by the [Twig functions](recommendations_twig_functions.md) and included in the templates. This approach may be blocked by ad blockers.
- `server` - tracking is handled on the backend, with events sent directly to the tracking API. It's not affected by ad blockers.
- `hybrid` - loads a local, first-party tracking JavaScript provided by the DXP instance, instead of the Raptor SaaS JavaScript.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- `hybrid` - loads a local, first-party tracking JavaScript provided by the DXP instance, instead of the Raptor SaaS JavaScript.
- `hybrid` - loads a local, first-party tracking JavaScript provided by the DXP instance, instead of the Raptor SaaS JavaScript. For more information, see [Hybrid tracking](hybrid_tracking.md).


## Hybrid tracking flow

When hybrid tracking is enabled, `TrackingScriptExtension` renders the proxy bootstrap template and loads the `raptor-proxy.js` shim, which replaces the `window.raptor.push` function and drains the initial event queue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, so let's make it clearer:

Suggested change
When hybrid tracking is enabled, `TrackingScriptExtension` renders the proxy bootstrap template and loads the `raptor-proxy.js` shim, which replaces the `window.raptor.push` function and drains the initial event queue.
When hybrid tracking is enabled, `TrackingScriptExtension` renders the proxy bootstrap template and loads the `raptor-proxy.js` shim, which replaces the `window.raptor.push` function and sends out the events queued before the tracking consent was given.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This note is broken in rendering

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants