Search


Search something to see results

StripParamsRule

A strip query params rule selects a subset of resources and strips some params of it. See SpeedKitConfig.stripQueryParams | the strip query params option for more information.

1.17.0

interface StripParamsRule {
    enabledSites?: SpeedKitRule[];
    params: Condition;
    rules?: SpeedKitRule[];
}

Index

Properties

Properties

enabledSites?: SpeedKitRule[]

The sites on which this strip query params rule is enabled.

[{ "pathname": "/product/details/" }]

In this example, Speed Kit will strip query params given by the params property from all resources requested from a product details page under the path of "/product/details/". All other resources will not be affected by this rule.

1.17.0

params: Condition

The params to be stripped from the selected resources.

['analytics', 'gclid']

Speed Kit will remove “analytics” and “gclid” query parameters before issuing and caching the request.

1.17.0

rules?: SpeedKitRule[]

The rules to match only some resources.

[{ url: 'www.googletagmanager.com/gtm.js' }]

In this example, Speed Kit will strip query params given by the params property of the Google Tag Manager request. All other resources will not be affected by this rule.

1.17.0