I think that you'll need to create a module. Use the following steps:
- Your module will contain an install script. This script will be responsible with creating a table(let's call it
registered_from
with registered_id
, customer_id
, registered_from
) + creating a FK between this table and customer_entity
table.
2.On customer_login
event, check if the previous page was checkout page or registration page and save that information in the registered_from
table.
3.Now, you'll be able to check if the user has been registered from checkout or from register page by checking registered_from
value from corresponding record(loaded by customer_id
).
Good luck !