Skip to content

[Feature Request]: Add option to include search params in page IDΒ #680

@wontons

Description

@wontons

Please provide your feature request

Within the configuration file of the RUM web client there exists an option named pageIdFormat. This defines what will be used as the page ID option while recording page views. The current options that exist are PATH, HASH, and PATH_AND_HASH. In our application we use several 'tabs' that modify the search parameters only - not the path. I would like to propose a new PATH_AND_SEARCH option to the list of pageIdFormat options.

For example, consider the url: github.com/aws-rum-web?options=1#start
PATH is considered to be /aws-rum-web
HASH is considered to be /#start
PATH_AND_HASH is considered to be /aws-rum-web#start

The PATH_AND_SEARCH option would then produce /aws-rum-web?options=1 as a page ID.

Idea:

  • Add "PATH_AND_SEARCH" param to PageIdFormatEnum
  • Add a case check in the PageViewPlugin.createIdForCurrentPage to check for window.location.search and return if required

Questions: Would this work "plug-and-play" with the user journey? I assume going from PATH to PATH_AND_HASH isn't much of a difference. So maybe PATH_AND_SEARCH would be simple as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions