Thanks Jarno.
With that guide I have succeeded.
I only doubt remains. How do you do when you want to put an event on a specific page? That is, you can put several different events on a website and if the user enters through one of those pages that are not activated until they have consent.
Thanks.
Oscar.