Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-6401: Exporting Product and Content metadata to CDP #2156

Merged
merged 13 commits into from
Nov 14, 2023
14 changes: 14 additions & 0 deletions docs/cdp/cdp_activation/cdp_activation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---

Check warning on line 1 in docs/cdp/cdp_activation/cdp_activation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/cdp/cdp_activation/cdp_activation.md#L1

[Ibexa.ReadingLevel] The grade level is 12.21. Aim for 8th grade or lower by using shorter sentences and words.
Raw output
{"message": "[Ibexa.ReadingLevel] The grade level is 12.21. Aim for 8th grade or lower by using shorter sentences and words.", "location": {"path": "docs/cdp/cdp_activation/cdp_activation.md", "range": {"start": {"line": 1, "column": 1}}}, "severity": "WARNING"}
description: Step-by-step activation procedure of [[= product_name_cdp =]].
page_type: landing_page
---

# Administration

Follow step-by-step activation procedure of [[= product_name_cdp =]].
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

[[= cards([
"cdp/cdp_activation/cdp_configuration",
"cdp/cdp_activation/cdp_data_export",
"cdp/cdp_activation/cdp_add_clientside_tracking",
], columns=3) =]]
34 changes: 34 additions & 0 deletions docs/cdp/cdp_activation/cdp_add_clientside_tracking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---

Check warning on line 1 in docs/cdp/cdp_activation/cdp_add_clientside_tracking.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/cdp/cdp_activation/cdp_add_clientside_tracking.md#L1

[Ibexa.ReadingLevel] The grade level is 5.59. Aim for 8th grade or lower by using shorter sentences and words.
Raw output
{"message": "[Ibexa.ReadingLevel] The grade level is 5.59. Aim for 8th grade or lower by using shorter sentences and words.", "location": {"path": "docs/cdp/cdp_activation/cdp_add_clientside_tracking.md", "range": {"start": {"line": 1, "column": 1}}}, "severity": "WARNING"}
description: Client-side Tracking in [[= product_name_cdp =]].
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
---

# Add Client-side Tracking

The final step is setting up a tracking script.
It requires a head tracking script between the `<head></head>` tags on your website
and a main script after the head script, and cookie consent.
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
You can do it by following [tutorial in the documentation](https://support.raptorsmartadvisor.com/hc/en-us/articles/115000656909-Client-side-Tracking).
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

Now, you need to add a tracker to specific places in your website where you want to track users.
For example, add this tracker to the Landing Page template if you want to track user entrances.
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

```js
raptor.trackEvent('visit', ..., ...);
```
or buys:
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

```js
//Parameters for Product 1
raptor.trackEvent('buy', ..., ...);
//Parameters for Product 2
raptor.trackEvent('buy', ..., ...);
```

For tracing to be effective, you also need to send ID of a logged-in user in the same way.
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
Add the user ID information by using below script:

```js
raptor.push("setRuid","USER_ID_HERE")
```

For more information on tracking events, see [the documentation](https://support.raptorsmartadvisor.com/hc/en-us/articles/201912411-Tracking-Events).
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
65 changes: 65 additions & 0 deletions docs/cdp/cdp_activation/cdp_configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---

Check warning on line 1 in docs/cdp/cdp_activation/cdp_configuration.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/cdp/cdp_activation/cdp_configuration.md#L1

[Ibexa.ReadingLevel] The grade level is 6.53. Aim for 8th grade or lower by using shorter sentences and words.
Raw output
{"message": "[Ibexa.ReadingLevel] The grade level is 6.53. Aim for 8th grade or lower by using shorter sentences and words.", "location": {"path": "docs/cdp/cdp_activation/cdp_configuration.md", "range": {"start": {"line": 1, "column": 1}}}, "severity": "WARNING"}
description: Step-by-step configuration procedure of [[= product_name_cdp =]].
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
---

# Configuration
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

To configure [[= product_name_cdp =]], use the `ibexa.system.<scope>.cdp` [configuration key](configuration.md#configuration-files):

```yaml
ibexa:
system:
default:
cdp:
account_number: 123456
data_export:
user_data:
transport: stream_file
stream_file:
stream_id: 00000000-00000000-00000000-00000000
content_data:
transport: stream_file
stream_file:
stream_id: 00000000-00000000-00000000-00000000
product_data:
transport: stream_file
stream_file:
stream_id: 00000000-00000000-00000000-00000000
activations:
client_id: '%env(CDP_ACTIVATION_CLIENT_ID)%'
client_secret: '%env(CDP_ACTIVATION_CLIENT_SECRET)%'
segment_group_identifier: ibexa_cdp
```

- **Account number** - can be obtained from Accounts settings in [[= product_name_cdp =]] dashboard
- **Stream ID** - use Stream ID generated during data import from "stream file" in Data Manager
- **Activations** - you can configure multiple activations, they have to be of type `[[= product_name_base =]]` in [[= product_name =]] dashboard
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
- **Client ID** and **Client secret** - Client ID and Secret pair is used to authenticate against Webhook endpoint, make sure it's random and secure
- **Segment group identifier** - is where CDP data is be imported to
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

## Segment group
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

First, create a segment group in the Back Office.
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
It serve as a container for all segments data generated by [[= product_name_cdp =]].
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
Go to **Admin** -> **Segments** and select **Create**.
Fill in name and identifier for a segment group.
Choose wisely, as once connected to CDP Segment Group cannot be changed.
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

![Creating a new segment group](cdp_create_segment_group.png)

Next, add a segment group identifier to the configuration.

!!! caution "[[= product_name_cdp =]] Segment Group"

After you create the Segment Group in the Back Office and connect it to [[= product_name_cdp =]], you cannot change it in any way, including edit its name.

julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
## Account number

Now, fill in the account number.
Log in to [[= product_name_cdp =]] and in the top right corner, select available accounts.

![List of available accounts](cdp_accounts.png)

A pop-up window displays with a list of all available accounts and their numbers.
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

![Account number](cdp_account_number.png)
Original file line number Diff line number Diff line change
@@ -1,87 +1,47 @@
---
description: Step-by-step activation procedure of Ibexa CDP.
description: Step-by-step data export procedure in [[= product_name_cdp =]].
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved
---

# CDP activation

## Configuration

To configure [[= product_name_cdp =]], use the `ibexa.system.<scope>.cdp` [configuration key](configuration.md#configuration-files):

```yaml
ibexa:
system:
default:
cdp:
account_number: 123456
data_export:
user_data:
transport: stream_file
stream_file:
stream_id: 00000000-00000000-00000000-00000000
activations:
-
client_id: '%env(CDP_ACTIVATION_CLIENT_ID)%'
client_secret: '%env(CDP_ACTIVATION_CLIENT_SECRET)%'
segment_group_identifier: example_segment_group_identifier
```

All configuration settings are described below.
You can follow them step by step to set up your [[= product_name_cdp =]].

### Segment group

First, create a segment group in the Back Office.
It will serve as a container for all segments data generated by [[= product_name_cdp =]].
Go to **Admin** -> **Segments** and select **Create**.
Fill in name and identifier for a segment group.
Choose wisely, as once connected to CDP Segment Group cannot be changed.

![Creating a new segment group](img/cdp_create_segment_group.png)

Next, add a segment group identifier to the configuration.

!!! caution "[[= product_name_cdp =]] Segment Group"

After you create the Segment Group in the Back Office and connect it to [[= product_name_cdp =]], you cannot change it in any way, including edit its name.

## Account number

Now, fill in the account number.
Log in to [[= product_name_cdp =]] and in the top right corner, select available accounts.

![List of available accounts](img/cdp_accounts.png)

A pop-up window displays with a list of all available accounts and their numbers.

![Account number](img/cdp_account_number.png)

## Data export
# Data export

You need to specify a source of the user data that [[= product_name_cdp =]] will connect to.
To do so, go to **Data Manager** in **Tools** section and select **Create new dataflow**.
It will take you to a Dataflow Creator, where in five steps you will set up a data streaming.

### General Information
## General Information

In the **General Information** section, specify dataflow name,
choose **Stream File** as a source of user data and **CDP** as a destination,
where they will be sent for processing.
Currently, only Stream File transport is supported and can be initialized from the configuration.

### Download
## Download

In the **Download** section, select **Stream file**.
Copy generated steam ID and paste it into the configuration file under `stream_id`.
It allows you to establish a datastream from the Streaming API into the Data Manager.

Next, you need to export your user data to the CDP.
Next, you need to export your data to the CDP.
Go to your installation and use this command:

- for User:

```bash
php bin/console ibexa:cdp:stream-user-data --draft
```

- for Product:

```bash
php bin/console ibexa:cdp:stream-product-data --draft
```

- for Content:

```bash
php bin/console ibexa:cdp:stream-content-data --draft
```

There are two versions of this command `--draft/--no-draft`.
The first one is used to send the test user data to the Data Manager.
If it passes a validation test in the **Activation** section, use the latter one to send a full version.
Expand All @@ -90,7 +50,7 @@ Next, go back to [[= product_name_cdp =]] and select **Validate & download**.
If the file passes, you will see a confirmation message.
Now, you can go to the **File mapping** section.

### File mapping
## File mapping

Mapping is completed automatically, the system fills all required information and shows available columns with datapoints on the right.
You can change their names if needed or disallow empty fields by checking **Mandatory**.
Expand All @@ -99,7 +59,7 @@ If the provided file contains empty values, this option is not available.
If provided file is not recognized, the system will require you to fill in the parsing-options manually or select an appropriate format.
If you make any alterations, select the **Parse File** to generate columns with new data.

### Transform & Map
## Transform & Map

In the **Transform & Map** section you transform data and map it to a schema.
At this point, you can map **email** to **email** and **id** to **integer** fields to get custom columns.
Expand All @@ -108,11 +68,11 @@ Next, select **Create schema based on the downloaded columns**.
It will move you to Schema Creator.
There, choose **PersonalData** as a parent and name the schema.

![Create new schema](img/cdp_create_new_schema.png)
![Create new schema](cdp_create_new_schema.png)

Next, select all the columns and set Person Identifier as **userid**.

![Person Identifier](img/cdp_person_identifier.png)
![Person Identifier](cdp_person_identifier.png)

If you used PersonData or Catalog type schemas, the system will require
specifying the Write Mode that will be applied to them.
Expand All @@ -124,9 +84,9 @@ For example, if a customer unsubscribes a newsletter, their email will remain in

Next, select **userid** from a **Schema columns section** on the right and map it to **id**.

![Map userid to id](img/cdp_userid_mapid.png)
![Map userid to id](cdp_userid_mapid.png)

### Activation
## Activation

In this section you will test the dataflow with provided test user data.
If everything passes, go to your installation and export production data with this command:
Expand All @@ -137,7 +97,7 @@ php bin/console ibexa:cdp:stream-user-data --no-draft

Now you can run and activate the dataflow.

### Build new Audience/Segment
## Build new Audience/Segment

Go to the **Audience Builder** and select **Build new audience**.
When naming the audience remember, you will need to find it in a drop-down list during activation.
Expand All @@ -156,7 +116,7 @@ You can configure multiple activations based data flows.
First, from the menu bar, select **Activations** and create a new **Ibexa** activation.
Specify name of your activation, select `userid` as **Person Identifier** and click **Next**.

![General Information - Activation](img/cdp_activation_general_info.png)
![General Information - Activation](cdp_activation_general_info.png)

Next, you can fill in **Ibexa information** they must match the ones provided in the YAML configuration:

Expand All @@ -165,41 +125,10 @@ Next, you can fill in **Ibexa information** they must match the ones provided in
- **Segment Group Identifier** - identifier of the segment group in [[= product_name =]]. It points to a segment group where all the CDP audiences will be stored.
- **Base URL** - URL of your instance with added `/cdp/webhook` at the end.

![Ibexa Information - Activation](img/cdp_activation_ibexa_info.png)
![Ibexa Information - Activation](cdp_activation_ibexa_info.png)

Finally, you can specify the audiences you wish to include.

!!! note "CDP requests"

All CDP requests are logged in with `debug` severity.

## Add Client-side Tracking

The final step is setting up a tracking script.
It requires a head tracking script between the `<head></head>` tags on your website
and a main script after the head script, and cookie consent.
You can do it by following [tutorial in the documentation](https://support.raptorsmartadvisor.com/hc/en-us/articles/115000656909-Client-side-Tracking).

Now, you need to add a tracker to specific places in your website where you want to track users.
For example, add this tracker to the Landing Page template if you want to track user entrances.

```js
raptor.trackEvent('visit', ..., ...);
```
or buys:

```js
//Parameters for Product 1
raptor.trackEvent('buy', ..., ...);
//Parameters for Product 2
raptor.trackEvent('buy', ..., ...);
```

For tracing to be effective, you also need to send ID of a logged-in user in the same way.
Add the user ID information by using below script:

```js
raptor.push("setRuid","USER_ID_HERE")
```

For more information on tracking events, see [the documentation](https://support.raptorsmartadvisor.com/hc/en-us/articles/201912411-Tracking-Events).
Loading