So you have a centralized database that tracks all purchases country-wide? Maybe Portugal government could compete with Google/FB providing personalized ads...
Portugal is moving to digital receipts for individuals in 2019. If you give the cashier your VAT ID, no paper receipt is produced, and you may download the receipt from your IRS dashboard.
Anonymous paper receipts will remain valid, indefinitely (i.e. they are not being phased out).