'How to get parameters from dynamiclink?

I want to get parameters from dynamiclink if it is possible however I couldn't find the solution.

this is the link : https://test.page.link/xxx

if I put query parameters to https://test.page.link/xxx?p=3

how can I get that "p" ?

if I use this:

 dynamicLinks().onLink((url) => {
      window.console.log('url ', url);
    });

I am getting deeplink like : www.google.com



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source