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

feat(content analytics) fixes #30521 : Allow users to pass down simple Strings to query for Content Analytics data #30869

Conversation

jcastro-dotcms
Copy link
Contributor

@jcastro-dotcms jcastro-dotcms commented Dec 6, 2024

Proposed Changes

  • After discussion with the team, here's the new data format for the simple String query. By default, the request scheme is prepended to the appropriate terms so users won't have to repeat so many times:
{
    "measures": "count,totalSessions",
    "dimensions": "host,whatAmI,url",
    "timeDimensions": "createdAt,day:Last month",
    "filters": "totalRequest gt 0,whatAmI contains PAGE||FILE",
    "order": "count asc,createdAt asc",
    "limit": 50,
    "offset": 0
}

If you want to set a specific scheme, just pass it down in the JSON body like this:

{
    "scheme": "YOUR-SCHEME-NAME-HERE",
     ...
     ...
}

The following must be taken into account when putting a query together:

  • Measures: Values are separated by commas: count,totalSessions
  • Dimensions: Values are separated by commas: host,whatAmI,url
  • Time Dimensions: Values are separated by a comma: createdAt,day:Last month . The second parameter 'day' -- the "granularity" parameter -- is optional, and separated from the date range by a colon.
  • Filters: Values are separated by commas: totalRequest gt 0,whatAmI contains PAGE||FILE . In the contains clause, values are separated by ||.
  • Order: Values are separated by comma: count asc,createdAt asc
  • Limit: Value is provided as is: 50
  • Offset: Value is provided as is: 0

This PR fixes: #30521

This PR fixes: #30521

…e Strings to query for Content Analytics data
@jdotcms jdotcms enabled auto-merge December 6, 2024 03:50
@jdotcms jdotcms added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit 363774c Dec 6, 2024
36 checks passed
@jdotcms jdotcms deleted the issue-30521-Create-content-analytics-query-endpoint-that-doesnt-require-map-PR2 branch December 6, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create content analytics query endpoint that doesn't require map
5 participants