What you need to do is to create a uuid that you assign to each cookie/user. All gclids are stored under this cookie. Once this anonymous user signs up, you now attach an account id to this uuid. For this you need to be able to pass information between two domains:
abc.com and
app.abc.com. You also need to update your cookie preferences and take user permission to be gdpr compliant (another discussion altogether).
Anyways, once you have a table which has these columns: UUID, gclid, click timestamp, click url, form submit timestamp, user email, account id.
You then need to join this table with your table which contains product analytics. Aim to get the table which has these columns: account id, user email, payment status, is_customer
Once you have these two tables simple join them to get a unified view. You would need to think of scenarios where multiple users maybe linked to the same account id and vice versa, for your attribution calculations.