Sure, but I thought you already fire event based on data layer trigger. Now you need datalayer variables to fetch all the needed data from datalayer event and store that in the analytics backend via analytics custom event.
I want to continue the discussion on this topic. Before i found other alternate to perform the desired task. But now again, i need to use this functionality.
let me tell you how i need this.
In my application, there is question/answer section. This is completely dynamic. So now i need to collect the data if user given answer meet certain answer. So i now need the question and given answer to be shown in analytics. The datalayer is the only way i am thinking right now to achieve this.
Below is my so far progress.
I created 2 Custom Data Layer Variables(fzQuestion and fzAnswer).
I create a datalayer event trigger.
trigger is attached to the Tag.
Now this datalayer event trigger is visible in the tracker debugger. But the 2 defined custom variables are not visible in analytics section, On website debug section the 2 custom variable are also present with the assigned values.
Nevermind. I figured out how to make it work.