Gated content: Asking users to fill in a short survey(2-5 questions) before allowing to download a free product

We are currently working on updating our website. all products we have require a user login as they all communicate with our cloud. So to use any of our products users will still need to sign up for an id via the website. however some products are free and some are subscription or license based.

We would like to collect some demographic information about our users but at the same time keep the sign up process fast and simple. We have good idea already who uses our premium products but little about people who use our free product range.

We thinking of adding a pop up survey with (2-5 questions) that would be triggered when user tries to download a free product. Which creates a gated content and from looking at information above it seems like this is a bad choice. this download doesn't need to require login as premium products because of absence of subscription but user will need to have an account set up to use the free product anyway.

What would be the best way to combine this data collection while keeping sign up and login process to minimum input but at the same time avoid gated content, should we just keep questions to a minimum and add them to sign up or maybe reach out directly via free app ui to fill in the form?

Any leads will be much appreciated