This feature is available in the Pro version starting from v1.2.6.4.

Overview

Asset CleanUp Pro includes a feature called “Unload on the Homepage” when unloading plugins in the front-end view, as well as load a plugin on the homepage as an exception (from an already set unload rule), which allows you to prevent specific plugins from loading on your website’s homepage. However, due to very early execution in WordPress (necessary for the plugin unloaded feature to work correctly), before functions like is_front_page() or is_home() are available, the detection of the homepage can be affected by query strings in the URL. By default, Asset CleanUp Pro detects the homepage if the request URI is the same as the one as the main site URL if it has no query string or if it has one of the predefined query strings. For instance, “utm_source” belongs to Google Analytics, so a URL such as www.yoursite.com/?utm_source=value_here will be detected as the homepage by Asset CleanUp Pro). To improve accuracy, Asset CleanUp Pro now includes a setting where you can manually specify additional query strings that should be ignored when determining whether the current page is the homepage. This is useful when certain marketing parameters (e.g., campaign_id, custom_param_example) cause the homepage to be misidentified as a different page.

How to use this feature?

  1. Go to “Settings” → “Plugin Usage Preferences” → “Plugins Manager” (tab)
  2. In the “IN FRONTEND VIEW (your visitors)” sub-tab, locate the following area: “Additional Query Strings to Ignore for Homepage Detection
  3. In the textarea, enter the query strings that should be ignored (one per line), taking into account the existing predefined ones, that are mentioned below.
  4. Finally, don’t forget to apply the changes, by using this button at the bottom: “Update All Settings

Example Use Case

Before:

  • Your homepage URL: https://yoursite.com/
  • A visitor accesses: https://yoursite.com/?ignorable_analytics_custom_param=value
  • Since ignorable_analytics_custom_param is not in the default list of ignored parameters, Asset CleanUp Pro may not recognize the page as the homepage.

After:

If you add custom_param_example to the list of ignored query strings, Asset CleanUp Pro will correctly identify https://yoursite.com/?ignorable_analytics_custom_param=value as the homepage and apply the unload (on the homepage) and load exception rules properly.

Notes

  • Only add query strings that do not alter the core content of the homepage.
  • Avoid adding parameters that determine dynamic content (e.g., ?p=123), as this could lead to incorrect optimisations. In this example “p” is a WordPress query string for singular pages (e.g. an article).
  • ⚠️  Be cautious when adding extra query strings to the ignore list! For example, add-to-cart might be used for a specific action unrelated to the homepage, such as the action of adding something to a shopping cart, and then redirecting to the checkout (e.g. by another plugin such as WooCommerce). Always ensure that the parameters added to the ignore list are safe for homepage detection. In this example, if you add “add-to-cart” to the list, and also unload the eCommerce plugin (e.g. WooCommerce) on the homepage, then the functionality will break.
  • The predefined list of ignored query strings includes common analytics and marketing parameters, but this feature gives you control over additional parameters specific to your site.

List of known query strings that are ignored when detecting the homepage

Asset CleanUp Pro already includes a built-in list of query strings that are ignored by default when detecting the homepage. After all, we know that yoursite.com/?utm_source=value should be detected as the homepage. Below is the predefined list:
'_ga',
'_ke',
'adgroupid',
'adid',
'age-verified',
'ao_noptimize',

'campaignid',
'ck_subscriber_id',

// ConvertKit's query parameter
'cn-reloaded',

'currency',

'dclid',
'dm_i', // dotdigital
'dm_t', // dotdigital
'ef_id',
'epik',
// Pinterest
'fb_action_ids',
'fb_action_types',
'fb_source',
'fbclick',
'fbclid',
'gclid',
'gclsrc',

// GoDataFeed
'gdfms',
'gdftrk',
'gdffi',

// Mailchimp
'mc_cid',
'mc_eid',

// Marketo (tracking users)
'mkt_tok',

// Microsoft Click ID
'msclkid',

// Matomo
'mtm_campaign',
'mtm_cid',
'mtm_content',
'mtm_keyword',
'mtm_medium',
'mtm_source',

// Piwik PRO URL builder
'pk_campaign',
'pk_cid',
'pk_content',
'pk_keyword',
'pk_medium',
'pk_source',

// Springbot
'redirect_log_mongo_id',
'redirect_mongo_id',
'sb_referer_host',

'ref',

'SSAID',
'sscid',
// ShareASale

'usqp',

'utm_campaign',
'utm_content',
'utm_expid',
'utm_medium',
'utm_referrer',
'utm_source',
'utm_term',
'utm_source_platform',
'utm_creative_format',
'utm_marketing_tactic',

's_kwcid',

// common one
'nocache',

// "User Switching" plugin
'user_switched',
'switched_back',

// Nextend Social Login and Register
'nsl_bypass_cache',

'_',

// Asset CleanUp's ones
'wpassetcleanup_load',
'wpassetcleanup_time_r',
'wpacu_print',
'wpacu_time',
'wpacu_updated',
'wpacu_ignore_no_load_option',
'wpacu_debug',
'wpacu_no_cache'
This list already covers many commonly used tracking and ignorable parameters that would not change the meaning of the homepage URI. If a query string you know you often use is not listed here, and can be ignored (e.g. specific_affiliate_ref, you can manually add using the feature presented in this post.

FAQ

Q: Why doesn’t Asset CleanUp Pro use is_front_page() or is_home() to detect the homepage?

A: WordPress typically runs these conditional checks at a later stage in the request, after other plugins have already loaded or influenced the main query. Asset CleanUp Pro needs to unload plugins before they run any code, so it performs homepage detection earlier.

Q: What happens if I add a query string that’s used for a specific request (e.g. adding a product to the cart) to the ignore list?

A: Any request with that query string will be treated as if it’s the homepage, potentially causing unintended plugin unloading and errors. Always confirm that the query string doesn’t affect site functionality before ignoring it.

Q: Can I remove default ignored query strings from the list?

A: By default, the plugin ships with a predefined list of query strings commonly used for tracking or marketing. Removing them is usually not recommended, as it may lead to the homepage not being recognized in certain scenarios. If you really need to alter the list (this is mostly for advanced users), you can do so using the “wpacu_skip_query_strings_for_homepage_detection” filter that is found within the plugin’s “early-triggers.php” file (root directory of the plugin). Note that it needs to be used very early (e.g. in a custom MU plugin that triggers before the MU plugin that belongs to Asset CleanUp Pro: /mu-plugins/wpacu-plugins-filter.php).

Q: What should I do if I’m not sure whether a query string can safely be ignored?

A: Test it. Add the query string to the ignore list on a staging or development site, then verify that your homepage and all features (including AJAX requests) work as expected. If you notice any issues, remove the query string from the list.

Conclusion

By understanding how early homepage detection works and carefully managing query strings (only if you have to, many users will never have to use this option), you can improve the way the homepage is detected. If in doubt, you can use enable “Test Mode”, and make a few tests to make sure your homepage remains properly detected, even with custom parameters in the site’s URL.

Was this post helpful?