Documentation Guides Managing URL Query Parameters

Managing URL Query Parameters


Starting with version 14.5, WP Statistics has expanded its features to include advanced management of URL query parameters. Users can now specify allowed query parameters for more precise tracking and perform retroactive cleanups of recorded query parameters to align historical data with current settings.

By default, we exclude all parameters to ensure a clean and relevant dataset, with the exception of a predefined set that is commonly used for tracking marketing campaigns and site performance.

Default Parameters

The default parameters that WP Statistics retains for tracking purposes are as follows:

  • ref (referrer)
  • source (source of traffic)
  • utm_source (Urchin Tracking Module source)
  • utm_medium (UTM medium)
  • utm_campaign (UTM campaign)
  • utm_content (UTM content)
  • utm_term (UTM term)
  • utm_id (UTM ID)
  • s (search term)
  • p (page identifier)

These parameters are widely recognized and used for analytics and marketing attribution. They provide valuable insights into where your traffic is coming from and how users interact with your content.

Customizing Parameters

If you have additional parameters that are specific to your tracking needs, WP Statistics allows you to add these to the retained list. To add a parameter, simply enter it into the settings field, and it will be included in your data retention.

Here is a suggested list of additional parameters you might consider adding based on standard online marketing practices:

  • gclid (Google Click Identifier, for AdWords campaign tracking)
  • fbclid (Facebook Click Identifier, for Facebook campaign tracking)
  • dclid (DoubleClick Click Identifier, for Google Display Network tracking)
  • msclkid (Microsoft Click Identifier, for Bing Ads tracking)
  • campaignid (For tracking specific marketing campaigns)
  • adgroupid (For identifying the ad group within a campaign)
  • keyword (For tracking the specific keyword in search campaigns)

To ensure that your analytics are as accurate and informative as possible, add only those parameters that will provide meaningful data for your site.

Reset to Default

If at any time you wish to revert to the default settings, simply click the “Reset to Default” button. This will clear any custom parameters you have added and revert to the standard list of parameters that WP Statistics retains by default.

Certainly! Here is an additional section that you can include in your documentation to describe the “Clean Up Recorded Query Parameters” feature:

Clean Up Recorded Query Parameters

WP Statistics also provides a feature to retroactively clean up your historical statistics data. This is particularly useful when you have updated your Allow List settings for URL query parameters and wish to apply these changes to data already recorded.

How It Works

Under Optimization -> Data Cleanup, you will find the option Clean Up Recorded Query Parameters. This tool allows you to remove unwanted query parameters from your historical data. When executed, it will:

  1. Scan your existing statistics.
  2. Identify any query parameters not currently on your Allow List.
  3. Remove these parameters from your historical records.

When to Use This Feature

You should consider using this cleanup tool when:

  • You have added new parameters to your Allow List and want to ensure past data only includes these parameters.
  • You have removed parameters from your Allow List and need to delete them from historical entries to maintain data consistency.
  • You have adjusted your privacy settings and must apply these changes to past data.

Important Considerations

Before using this cleanup tool, please note:

  • Data Modification: This action will permanently modify your historical data. It’s recommended to back up your data before proceeding.
  • Reversibility: Once the cleanup is performed, the action cannot be reversed. Ensure your Allow List is finalized before running the cleanup.