If you want to automatically ask the user whether he has subscribed to the channel when the link of your Youtube channel is clicked, you need to add ?sub_confirmation=1 to your URL address, after your channel address.
You can test it by clicking on my youtube channel address.
You can test it by clicking on my youtube channel address.