Skip to Content
DestinationsMixpanelStrip URL Parameters

Strip URL Parameters from current_URL

This custom event property technique removes URL query parameters to facilitate cleaner analysis.

Purpose

Convert URLs with query parameters into their base form. For example:

xxx.myshopify.com?utm_source=test&utm_medium=test becomes xxx.myshopify.com

Code Implementation

In Mixpanel’s custom property editor, use:

SPLIT(CURRENT_URL, "?", 1)

This formula uses the SPLIT function to divide the current URL at the question mark character and returns the first segment, effectively stripping away all query parameters.

Note: Replace CURRENT_URL with the actual Mixpanel property selector for Current URL in the custom property editor.

Last updated on