Sometimes you want to focus your clients' focus to a specific size, price, or location on your website. Sure, they can click a few buttons to get there, but modifying your URL gives you the option to send your customer exactly where they need to be.
The best way to do this? Using a URL query parameter!
What exactly is a URL? A query parameter? Here's a few helpful definitions from Mozilla's guide:
A URL (Uniform Resource Locator) is the address of a unique resource on the internet. It is one of the key mechanisms used by browsers to retrieve published resources, such as HTML pages, CSS documents, images, and so on.
Url parameters are a list of key/value pairs separated with the & symbol. The Web server can use those parameters to do extra stuff before returning the resource. Each Web server has its own rules regarding parameters, and the only reliable way to know if a specific Web server is handling parameters is by asking the Web server owner.
Let's take a look at the most common places you might want to use a URL parameter!
Filtering Your Units
While we have unit filters on a page to help customers filter for units, sometimes we want to preset the filters for a user when they arrive on a page. This is where URL parameters are useful.
Unit Sizes
sizes: List of unit sizes (sm, md, lg, xl) split by a comma
/units?sizes=sm /units?sizes=sm,xl
Unit Types
types: List of unit types (Drive Up Unit, Parking, etc.) split by a comma
/units?types=Drive%20Up/units?types=Drive%Up,Parking
Unit Prices
prices: List of minimum and maximum unit prices, in that order, split by a comma
/units?prices=10,50
You can also provide a single minimum value:
/units?prices=10
or single maximum value, but if you are only wanting a max value you have to add a comma.
/units?prices=,50
While you can use a single price value, it is better to use min_price or max_price parameters if you want to add one value.
min_price: Minimum value for a unit price
/units?min_price=10
max_price: Maximum value for a unit price
/units?max_price=50
Note: The price filter pulls from the street rate, not the discount rate.
Adding Multiple Parameters
You can mix and match as many URL parameters as you want to filter down units. Simply add an ampersand (&) between parameters.
Below are some common examples:
Small units with rates between $50 and $100
/units?sizes=sm&prices=50,100
Single location with Small or Medium sized units
/units?loc=308d498c-6ce0-493b-af18-b42e0d01fc0d&sizes=sm,md
Multiple Locations with Drive Up units
/units?loc=308d498c-6ce0-493b-af18-b42e0d01fc0d,defc10ce-2fcf-48ff-9c59-d8c4fb237215&types=Drive%20Up%20Unit
Still Need Help?
As always, if you have any questions or need assistance, email us at help@storagepug.com so our Client Success team can update your URLs for you. We're happy to help!