safe-global / safe-wallet-web

Safe{Wallet} – multisig EVM wallet
https://app.safe.global
GNU General Public License v3.0
337 stars 401 forks source link

Allow to share pages within a Safe App #2567

Open anxolin opened 11 months ago

anxolin commented 11 months ago

As a Safe App maintainer, I would love to share with my users a URL that includes a subpath within my Dapp and includes also some UTM parameters, so I can share the internal path of a new feature and include UTM params to track how many people followed the link.

Details

Currently, if we want to share CoW Swap app, we can share this link https://app.safe.global/share/safe-app?appUrl=https%3A%2F%2Fswap.cow.fi&chain=eth

This link will allow users to select their wallet and enter CoW Swap app using the main entry point (SWAP page).

Ideally we would like to do marketing campaigns and links in our documentation that would point to specific pages which contains other features: For example, TWAP page

Additionally, to measure the marketing campaign performance, we want to encode some UTM params in the URL.

In summary, we want to make this URL to work:

https://app.safe.global/share/safe-app?chain=gno&appUrl=https%3A%2F%2Fswap.cow.fi%2F%23%2F1%2Fadvanced%2FWETH%3Ftab%3Dopen%26page%3D1%26utm_campaign%3Deveryone-loves-cows-2023

image
mmv08 commented 11 months ago

To whoever ends up working on this issue, this was part of an old epic for manifest.json files: https://github.com/5afe/safe/issues/439 (the section about the start_url property). I think this is the most elegant and standard compliant solution to this; however, it might require a lot of work to integrate it with the safe-config-service.