Wrap variable value in a new format to URL

  • What Grafana version and what operating system are you using?
    Grafana 7.x.x
    Operating system: windows

Hi,
I am new to grafana, and I am recently experimenting with building data source plugins and scripted dashboards.
I am having a scripted metric dashboard where we need to select the metrics to display and many other variables.

I am just curious to understand when we select a value from a variable, how is that reflecting in the URL? Is that a configuration controlled by any plugin or the dashboard script? Is it possible to change that value mapping to a base64 encoded format or any other format?

Current behavior
http://localhost:5200/dashboard/script/scripted_templated.js?editPanel=1&from=-1341&to=1393341&orgId=1&rows=2&var-metric=LayerDuration&var-metric=LayerIdleTime

Expected behavior
http://localhost:5200/dashboard/script/scripted_templated.js?editPanel=1&from=-1341&to=1393341&orgId=1&rows=2&var-metric=WyJMYXllckR1cmF0aW9uIiwgIkxheWVySWRsZVRpbWUiXQ==