Skip to main content

Dynamic Loading of Configurations via URL Rules

Written by Alexandre Dias Da Silva

This article is part of the series Adapt your banner to each version of your site.

Before following the guide below, make sure you have reviewed the general presentation article Choose the right method to load the correct Axeptio banner.

To quickly integrate the multilingual widget on your site, we have implemented a regex system in our back office, under the "Integrate on your site" section

⚠️ For those unfamiliar with it, a regex (or regular expression in English) is a character string that describes, according to a precise syntax, a set of possible character strings 🤯

OK great. But concretely, what does that mean?

For our site, we used this feature. In the example below, this is the configuration for the English version. As you can see, we simply had to add en.* after our domain name.

✅ Don't forget to check the RegExp box!

With Axeptio's URL rules, conditional display of the widget is only possible when there is a path in the URL.

  • In a URL like mysite.com/blog, mysite.com is the domain, and /blog is the path.
    👉 Here, Axeptio can apply the rule because there is indeed a path to rely on.

  • On the other hand, in a URL like blog.mysite.com, blog.mysite.com is a subdomain… but there is no path behind it (no /something). So the URL rule cannot be applied, you will need to choose a different dynamic change.

A short explanatory video:

Did this answer your question?