Skip to main content

buildLogRocketQueryParams()

function buildLogRocketQueryParams(): string;

Builds a URL query string containing LogRocket-related parameters.

The query parameters include:

  • analyticsConsent: Indicates whether the user has consented to session recording ('true' or 'false').
  • lrEnabled: Indicates whether LogRocket is enabled based on the global configuration ('true' or 'false').
  • lrAppId: The LogRocket application ID, or an empty string if not available.
  • lrParentOrigin: The current window's origin, so a child iframe loaded with this query string can derive its parentDomain even when cross-origin restrictions block window.parent.location.origin.

Returns

string

The constructed query string with LogRocket parameters.