-
Notifications
You must be signed in to change notification settings - Fork 481
Open
Copy link
Labels
Description
Problem Statement
The "Content Present in Conversions" section in the Conversion Dashboard is showing duplicated values.
We are using the follow CubeJs query to feed this graphics
{
"dimensions": [
"ContentAttribution.eventType",
"ContentAttribution.identifier",
"ContentAttribution.title",
"ContentAttribution.conversions",
"ContentAttribution.events"
],
"timeDimensions": [
{
"dimension": "ContentAttribution.day",
"dateRange": ["2025-08-14", "2025-08-16"]
}
]
}
Of course the Time Dimesions filtering depends what the user select in the UI.
Steps to Reproduce
- Create a content_impresions using the follow payload:
{
"context": {
"site_auth": "DOT.8a7d5e23-da1e-420a-b4f0-471e7da8ea2d.XPPRJgzOIFlXZDfQR_qovElLX",
"session_id": "abc",
"user_id": "xxx",
"device": {
"screen_resolution": "1280x720",
"language": "en",
"viewport_width": "1280",
"viewport_height": "720"
}
},
"events": [
{
"event_type": "content_impression",
"local_time": "2025-12-17T09:01:00+02:00",
"data": {
"page": {
"url": "http://localhost/aaaaa",
"title": "aaaa Page"
},
"content": {
"identifier": "6",
"inode": "2",
"title": "this is a title 6",
"content_type": "A"
},
"position": {
"viewport_offset_pct": 18,
"dom_index": 5
},
"custom": {
"A": "B"
}
}
}
]
}
Remember use the right site_auth in your environment
- Create a content_click for the same content in the same day, using the follow payload:
{
"context": {
"site_auth": "DOT.8a7d5e23-da1e-420a-b4f0-471e7da8ea2d.XPPRJgzOIFlXZDfQR_qovElLX",
"session_id": "abc",
"user_id": "xxx",
"device": {
"screen_resolution": "1280x720",
"language": "en",
"viewport_width": "1280",
"viewport_height": "720"
}
},
"events": [
{
"event_type": "content_click",
"local_time": "2025-12-17T09:02:00+02:00",
"data": {
"page": {
"url": "http://localhost/aaaaa",
"title": "aaaa Page"
},
"content": {
"identifier": "6",
"inode": "2",
"title": "this is a title 6",
"content_type": "A"
},
"position": {
"viewport_offset_pct": 18,
"dom_index": 5
},
"element": { // dom element
"text": "text",
"type": "anchor", //anchor, button, input, etc.
"id": "id",
"class": "class",
"attributes": ["attribute1:value1", "attribute2:value2"]
},
"custom": {
"A": "B"
}
}
}
]
}
Remember use the right site_auth in your environment
- Create a second content-impresions but for the next day, you can say the same payload used in the first step but change the local_time with the follow value: "2025-12-18T09:01:00+02:00"
- Create a conversion for the same the day of the previous content_impression event using the follow payload:
{
"context": {
"site_auth": "DOT.8a7d5e23-da1e-420a-b4f0-471e7da8ea2d.XPPRJgzOIFlXZDfQR_qovElLX",
"session_id": "abc",
"user_id": "xxx",
"device": {
"screen_resolution": "1280x720",
"language": "en",
"viewport_width": "1280",
"viewport_height": "720"
}
},
"events": [
{
"event_type": "conversion",
"local_time": "2025-12-18T09:03:00+02:00",
"data": {
"conversion": {
"name": "ddd"
},
"page": {
"url": "http://localhost/aaaaa",
"title": "aaaa Page"
},
"custom": { //optional, any data that the customer want to add to rich the event data
"name": "purchase",
"value": 99.99,
"currency": "USD",
"category": "ecommerce"
}
}
}
]
}
-
Wait until the content_events_counter_mv view run
-
Go to the Analytics Search Portlet and run the follow query:
{
"dimensions": [
"ContentAttribution.eventType",
"ContentAttribution.identifier",
"ContentAttribution.title",
"ContentAttribution.conversions",
"ContentAttribution.events"
]
}
You are going to got the follow response:
[
{
"ContentAttribution.conversions": "2",
"ContentAttribution.eventType": "content_click",
"ContentAttribution.events": "1",
"ContentAttribution.identifier": "6",
"ContentAttribution.title": "this is a title 6"
},
{
"ContentAttribution.conversions": "2",
"ContentAttribution.eventType": "content_click",
"ContentAttribution.events": "2",
"ContentAttribution.identifier": "6",
"ContentAttribution.title": "this is a title 6"
},
{
"ContentAttribution.conversions": "3",
"ContentAttribution.eventType": "content_impression",
"ContentAttribution.events": "2",
"ContentAttribution.identifier": "6",
"ContentAttribution.title": "this is a title 6"
},
{
"ContentAttribution.conversions": "3",
"ContentAttribution.eventType": "content_impression",
"ContentAttribution.events": "1",
"ContentAttribution.identifier": "6",
"ContentAttribution.title": "this is a title 6"
}
]
This is wrong because we are getting 2 register for each event/content pair, aslo the conversions are couting wrong but I suppose it is because this issue #34142
Acceptance Criteria
You should got the follow response:
[
{
"ContentAttribution.conversions": "1",
"ContentAttribution.eventType": "content_click",
"ContentAttribution.events": "1",
"ContentAttribution.identifier": "6",
"ContentAttribution.title": "this is a title 6"
},
{
"ContentAttribution.conversions": "1",
"ContentAttribution.eventType": "content_impression",
"ContentAttribution.events": "2",
"ContentAttribution.identifier": "6",
"ContentAttribution.title": "this is a title 6"
}
]
dotCMS Version
latest in main
Severity
Critical - System unusable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
QA