Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 4243

Get a twig variable (1 reply)

$
0
0
Hello there, i am a new user of piwik.
I have my website in symfony framework. I have a twig variable {{ app.user.username }}, and the variable displays th username. How can i track it on piwik? Something like
var visitor_id;
_paq.push([ function() { visitor_id = {{ app.user.username|json_encode|raw }}; }]); 
????
i cant figure out how to do it. Please help me.

Viewing all articles
Browse latest Browse all 4243

Trending Articles