URL Query String Options

Being a business with an online presence means being able to deliver the best possible customer experience for new & existing customers. Part of that experience is ensuring the behaviour of the pages on your website are intuitive & smooth & one way to do that is by taking advantage of URL Query Strings.

A query string is the part of a uniform resource locator (URL) which assigns values to specified parameters. The query string commonly includes fields added to a base URL by a web browser or other application.

Within Mobi2Go, we have the ability of using a URL's query string which basically means we can link to specific elements or items to trigger a specific behaviour or result.

For example: If you wanted to show a list of locations on the page load, you can achieve this by appending a string query on the back of a URL.

 

List of available Query Strings 

Function

URL Example

Force UI (e.g. Mobile)

?no_redirect&ui=

mobile|web|web-embed|mobile-embed

www.demostoreco.nz/

order/?no_redirect&ui=mobile

Specify CSS Theme

?theme=

{THEME NAME}

www.demostore.co.nz/

order/?theme=bare

Show Category on page load*

?category=

{CATEGORY NAME}

www.demostore.co.nz/

order/?category=Sauces

Show Locations list on page load

?locations

www.demostore.co.nz/

order/?locations

Set Location on page load

?location=

{LOCATION NAME} or ?store=

{LOCATION NAME} ?location_id=

{LOCATION ID}

www.demostore.co.nz/

order/?location=Auckland Demo

www.demostore.co.nz/

order/?store=Auckland Demo*

www.demostore.co.nz/

order/?location_id=923

Set method on page load

?method=delivery or ?method=pickup

www.demostore.co.nz/

order/?method=pickup

Set voucher code on page load

?voucher_code=

{VOUCHER CODE}

www.demostore.co.nz/

order/?voucher_code=FreeChips

Set the customer's loyalty id

?customer_loyalty_

id={LOYALTY_ID}

www.demostore.co.nz/

order/?customer_loyalty_id=ID

Log JS events

?output_events  

Suppress our jQuery

?no_jquery

www.demostore.co.nz/

order/?no_jquery

(This only works if client jquery is 1.x)

Suppress minification

?no_minify

www.demostore.co.nz/

order/?no_minify

Disable custom styles

?disable_custom

_styles

www.demostore.co.nz/

order/?disable_custom_styles

Disable custom script

?disable_custom

_script

www.demostore.co.nz/

order/?disable_custom_script

Disable Google Maps

?disable_gmaps

www.demostore.co.nz/

order/?disable_gmaps

Disable CSS animations

?disable_animation

www.demostore.co.nz/

order/?disable_animation

Change version

?version=

{VERSION}

www.demostore.co.nz/

order/?version=2

Force analytic scripts

?load_analytics

www.demostore.co.nz/

order/?load_analytics

Forces analytic scripts (Google Analytics and/or Google Tag Manager, as configured in the database) to load in non-production where they're normally suppressed.


Embed into another app

  • https://www.mobi2go.com/ store/page/demostore/mobile?ui=mobile&native=1&platform=ios&container_app=loke
  • https://www.mobi2go.com/ store/page/demostore/mobile?ui=mobile&native=1&platform=android&container_app=loke

And of course in addition you can still pass in location_id=<location_id> and auth_token=<auth_token>

The platform is visible in our sales stats, and the container_app tag will be what drives whether we show LOKE payments or not.


Remember

All names (i.e. location, category etc.) are case sensitive so where a category name is written as 'Category' in Mobi2Go for example, it must also be written the same in the URL string.

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.