You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cdp/cdp_activation/cdp_add_tracking.md
+20-5Lines changed: 20 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,27 @@
1
1
---
2
-
description: Client-side Tracking in Ibexa CDP.
2
+
description: Adding tracking in [[= product_name_cdp =]].
3
3
edition: experience
4
4
---
5
5
6
-
# Add Client-side Tracking
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.
7
21
8
-
The final step is setting up a tracking script.
9
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.
10
23
11
-
For more information about setting up a tracking script, see [Raptor documentation](https://content.raptorservices.com/help-center/client-side-tracking).
24
+
For more information about setting up a tracking script manually, see [Raptor documentation](https://content.raptorservices.com/help-center/client-side-tracking).
12
25
13
26
Now, you need to add a tracker to specific places in your website where you want to track users.
14
27
For example, add this tracker to the landing page template to track user entrances.
For tracking to be effective, you also need to send ID of a logged-in user in the same way.
29
-
Add the user ID information by using below script:
42
+
Add the user ID information of logged-in users by using below script:
30
43
31
44
```js
32
45
raptor.push("setRuid","USER_ID_HERE")
33
46
```
34
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
+
35
50
For more information on tracking events, see [the documentation](https://content.raptorservices.com/help-center/tracking-events-for-recommendation).
0 commit comments