Skip to content

Commit 39832b7

Browse files
committed
Added doc for Anonymous user segmentation in CDP
1 parent 2c8223a commit 39832b7

8 files changed

Lines changed: 105 additions & 42 deletions

File tree

docs/cdp/cdp_activation/cdp_activation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ Activation includes configuration, data export and adding Client-side Tracking.
1313
[[= cards([
1414
"cdp/cdp_activation/cdp_configuration",
1515
"cdp/cdp_activation/cdp_data_export",
16-
"cdp/cdp_activation/cdp_add_clientside_tracking",
17-
], columns=3) =]]
16+
"cdp/cdp_activation/cdp_add_tracking",
17+
], columns=3) =]]

docs/cdp/cdp_activation/cdp_add_clientside_tracking.md

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
description: Adding tracking in [[= product_name_cdp =]].
3+
edition: experience
4+
---
5+
6+
# Add tracking
7+
8+
The final step is setting up a tracking script that identifies visitors and records their interactions.
9+
You can set it up in two ways:
10+
11+
## Tracking with built-in Raptor tracking functions
12+
13+
If your project uses the [Raptor connector](raptor_connector.md), use the built-in [Raptor tracking functions](tracking_functions.md).
14+
This recommended approach supports both client-side and server-side tracking, handles cookie consent, and sets the tracking cookie required for [anonymous user segmentation](cdp_configuration.md#anonymous-user-segmentation).
15+
16+
For setup instructions, see [Raptor tracking functions](tracking_functions.md).
17+
18+
## Manual setup
19+
20+
If you aren't using the Raptor connector, you can set up tracking manually.
21+
22+
It requires a head tracking script between the `<head></head>` tags on your website, a main script after the head script, and cookie consent.
23+
24+
For more information about setting up a tracking script manually, see [Raptor documentation](https://content.raptorservices.com/help-center/client-side-tracking).
25+
26+
Now, you need to add a tracker to specific places in your website where you want to track users.
27+
For example, add this tracker to the landing page template to track user entrances.
28+
29+
```js
30+
raptor.trackEvent('visit', ..., ...);
31+
```
32+
or purchases:
33+
34+
```js
35+
//Parameters for Product 1
36+
raptor.trackEvent('buy', ..., ...);
37+
//Parameters for Product 2
38+
raptor.trackEvent('buy', ..., ...);
39+
```
40+
41+
For tracking to be effective, you also need to send ID of a logged-in user in the same way.
42+
Add the user ID information of logged-in users by using below script:
43+
44+
```js
45+
raptor.push("setRuid","USER_ID_HERE")
46+
```
47+
48+
For anonymous visitors, Raptor's tracking script automatically sets an `rsa` cookie that uniquely identifies the visitor, without calling the `setRuid` method.
49+
50+
For more information on tracking events, see [the documentation](https://content.raptorservices.com/help-center/tracking-events-for-recommendation).

docs/cdp/cdp_activation/cdp_configuration.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@ ibexa:
3131
client_id: '%env(CDP_ACTIVATION_CLIENT_ID)%'
3232
client_secret: '%env(CDP_ACTIVATION_CLIENT_SECRET)%'
3333
segment_group_identifier: example_segment_group_identifier
34+
membership: # For anonymous user segmentation
35+
activation_id: '%env(CDP_MEMBERSHIP_ACTIVATION_ID)%'
36+
api_key: '%env(CDP_MEMBERSHIP_API_KEY)%'
3437
```
3538
3639
- `account_number` - a [number](#account-number) obtained from Accounts settings in [[= product_name_cdp =]] dashboard
3740
- `stream_id` - stream ID generated when importing data from the stream file in Data Manage
3841
- `activations` - activation details. You can configure multiple activations. They have to be of type `Ibexa` in [[= product_name =]] dashboard
3942
- `client_id` and `client_secret` - client credentials are used to authenticate against the Webhook endpoint. Make sure they're random and secure
4043
- `segment_group_identifier` - a [location](#segment-group) to which CDP data is imported
44+
- `membership.activation_id` and `membership.api_key` - credentials for the CDP Membership API, required for [anonymous user segmentation](#anonymous-user-segmentation)
4145

4246
## Account number
4347

@@ -65,3 +69,38 @@ Choose wisely, as once connected to CDP segment group cannot be changed.
6569
![Creating a new segment group](cdp_create_segment_group.png)
6670

6771
Next, add a segment group identifier to the configuration.
72+
73+
## Anonymous user segmentation
74+
75+
To set up [segmentation for Anonymous visitors](cdp_guide.md#anonymous-user-segmentation), execute the following steps:
76+
77+
### Set up CDP API activation
78+
79+
Create an activation of type "CDP API" in the Raptor dashboard.
80+
For instructions, see [CDP API activations](https://content.raptorservices.com/help-center/cdp/activations/cdp-api) in Raptor documentation.
81+
82+
### Configure website tracking dataflow
83+
84+
Set up a "website tracking" dataflow with `coid` (cookie ID) as the person identifier so that Raptor can use the tracking data in the CDP.
85+
86+
For more information, see [Introduction to the Data Manager](https://content.raptorservices.com/help-center/tools/datamanager/introduction-to-the-data-manager) in Raptor documentation.
87+
88+
### Configuration
89+
90+
Add the `membership.activation_id` and `membership.api_key` credentials to your [`ibexa_cdp` configuration](#configuration).
91+
92+
To control how long resolved segment memberships are cached per visitor, use the `ibexa_segmentation.anonymous.cache` configuration key:
93+
94+
```yaml
95+
# config/packages/ibexa_segmentation.yaml
96+
ibexa_segmentation:
97+
anonymous:
98+
cache:
99+
enabled: true # default; set to false to disable
100+
ttl: 300 # cache lifetime in seconds, default 300 (5 minutes)
101+
pool: 'ibexa.cache_pool' # Symfony cache pool service ID, default ibexa.cache_pool
102+
```
103+
104+
- `enabled` - whether to cache CDP segment results per visitor cookie. Disabling this causes an additional API call to Raptor on every request
105+
- `ttl` - how long resolved segment results are cached per visitor (in seconds)
106+
- `pool` - the Symfony cache pool used to store the results

docs/cdp/cdp_guide.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: The Ibexa CDP product guide describes all the possibilities that the Customer Data Platform offers to help you build great customer experiences.
2+
description: The [[= product_name_cdp =]] product guide describes all the possibilities that the Customer Data Platform offers to help you build great customer experiences.
33
edition: experience
44
---
55

@@ -103,6 +103,14 @@ You can also connect created audiences to the activations.
103103

104104
![Audience Builder](img/audience_builder.png)
105105

106+
### Anonymous user segmentation
107+
108+
[[= product_name =]] can resolve CDP segments for anonymour users, enabling personalised content delivery for not logged-in visitors.
109+
110+
When an anonymous visitor accesses your site, Raptor starts building an [anonymous profile](https://content.raptorservices.com/help-center/introduction-to-person-identifiers-and-profile-unification).
111+
112+
You can segment these anonymous profiles into different audiences, exactly as in case of logged-in users, and use this information in [[= product_name =]] to provide personalized experiences for them.
113+
106114
## Benefits
107115

108116
### Personalized user experience

docs/cdp/cdp_installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Installation of standalone Ibexa CDP package.
2+
description: Installation of standalone [[= product_name_cdp =]] package.
33
edition: experience
44
---
55

@@ -10,7 +10,7 @@ First, you need to register your [[= product_name_cdp =]] account, then you can
1010

1111
## Register in [[= product_name_cdp =]] dashboard
1212

13-
If you decide to acquire [[= product_name_cdp =]] contact your sales representative, they provide you with a registration link to [[= product_name_cdp =]].
13+
If you decide to acquire [[= product_name_cdp =]], contact your sales representative to receive a registration link to [[= product_name_cdp =]].
1414
After registration, you get access to a separate instance where you can find data required for configuring, activating, and using this feature.
1515

1616
## Install CDP package

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ nav:
528528
- CDP activation: cdp/cdp_activation/cdp_activation.md
529529
- CDP configuration: cdp/cdp_activation/cdp_configuration.md
530530
- CDP data export: cdp/cdp_activation/cdp_data_export.md
531-
- CDP add client-side tracking: cdp/cdp_activation/cdp_add_clientside_tracking.md
531+
- CDP add tracking: cdp/cdp_activation/cdp_add_tracking.md
532532
- CDP data export schedule: cdp/cdp_data_export_schedule.md
533533
- CDP data customization: cdp/cdp_data_customization.md
534534
- Search:

plugins.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ plugins:
249249
'guide/basket/basket.md': 'commerce/commerce.md'
250250
'guide/basket/wishlist_and_stored_baskets.md': 'commerce/commerce.md'
251251
'commerce/wishlist_and_stored_baskets.md': 'commerce/commerce.md'
252-
'commerce/basket.md': 'commerce/commerce.md'
253252
'guide/checkout/checkout.md': 'commerce/checkout/checkout.md'
254253
'guide/checkout/order_confirmation.md': 'commerce/checkout/checkout.md'
255254
'commerce/checkout/order_confirmation.md': 'commerce/checkout/checkout.md'
@@ -586,3 +585,5 @@ plugins:
586585
'ai_actions/install_ai_actions.md': 'ai_actions/configure_ai_actions.md'
587586
'discounts/install_discounts.md': 'discounts/configure_discounts.md'
588587
'content_management/collaborative_editing/install_collaborative_editing.md': 'content_management/collaborative_editing/configure_collaborative_editing.md'
588+
589+
'cdp/cdp_activation/cdp_add_clientside_tracking.md': 'cdp/cdp_activation/cdp_add_tracking.md'

0 commit comments

Comments
 (0)