Hi,
I'm trying to do the same thing (quiz as conversion). A really simple solution I see would be that the quiz simply triggers an event when it's send and I can then listen to that event in js and manually triger a GA event. Like this:
// ari quiz plugin code: when quiz is sent
$( "document" ).trigger( "ariQuizSent", { title: "My first quiz" } );
// custom theme code to trigger google analytics event
$('document').on('ariQuizSent',function(event,quiz){
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event' : 'quiz',
'location' : quiz.title
});
})
The code is not tested and should only serve as an example
Please let me know if this is something you could do. It would really make life easier in terms of tracking.
Thanks,
Grega