Skip to content

[DEFECT] Change the CubeJS query used to "Content Present in Conversions" graphic #34172

@freddyDOTCMS

Description

@freddyDOTCMS

Problem Statement

We ned to change the CubeJS query used in the "Content Present in Conversions" graphic in the Conversion Analytics dashboard, We need to used the following query:

{

  "dimensions": [
    "ContentAttribution.eventType",
    "ContentAttribution.identifier",
    "ContentAttribution.title"

  ],
  "measures": [
    "ContentAttribution.sumConversions",
    "ContentAttribution.sumEvents"
  ]
}

We need to add the TimeDimensions filters that we need according.

With this new query we are going to fix this problem #34149

Also we are going to fix a problem when we have multiple users

Steps to Reproduce

The steps to reproduce the #34149 error are in the issue.

Also how I mentioned in the description we are going to fix another error with multiples user id, to reproduce this user error the steps are the follow:

  1. Create a content click event using the follow payload

{
    "context": {
        "site_auth": "DOT.8a7d5e23-da1e-420a-b4f0-471e7da8ea2d.XPPRJgzOIFlXZDfQR_qovElLX",
        "session_id": "abc",
        "user_id": "user_1",
        "device": {
            "screen_resolution": "1280x720",
            "language": "en",
            "viewport_width": "1280",
            "viewport_height": "720"
        }
    },
    "events": [
        {
            "event_type": "content_click",
            "local_time": "2025-12-21T09:00: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"
                }
            }
        }
    ]
}
  1. Create a conversion using the follow payload:

{
    "context": {
        "site_auth": "DOT.8a7d5e23-da1e-420a-b4f0-471e7da8ea2d.XPPRJgzOIFlXZDfQR_qovElLX",
        "session_id": "abc",
        "user_id": "user_1",
        "device": {
            "screen_resolution": "1280x720",
            "language": "en",
            "viewport_width": "1280",
            "viewport_height": "720"
        }
    },
    "events": [
        {
            "event_type": "conversion",
            "local_time": "2025-12-21T09:01:00+02:00",
            "data": {
                "conversion": {
                    "name": "rrr"
                },
                "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"
                }
            }
        }
    ]
}
  1. Repeat step 1 and 2, but change the userId by "user_2", and add 2 mimutes to each local time.
  2. Repeat step 3, but change the userId by "user_3", and add 2 mimutes to each local time.
  3. Check the Graphics in the dashboard and you are going to have 1 conversion and just one event click in the graphic.

Acceptance Criteria

Must be using the new CubeJS query on the dashboards

dotCMS Version

latest in main

Severity

Critical - System unusable

Metadata

Metadata

Assignees

Type

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions