Hi, I am trying to set avariable that's contains the users login
the issue is the the login user value is always overrides the old value.
I want to create asegment that make statictices for each login user in each login click.
<script type="text/javascript">
var _paq = _paq || [];
//_paq.push(['trackPageView']);
//_paq.push(['enableLinkTracking']);
(function () {
var u = (("https:" == document.location.protocol) ? "https" : "http") + "://192.168.1.82:8081/piwik/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', 1]);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.type = 'text/javascript';
g.defer = true; g.async = true; g.src = u + 'piwik.js'; s.parentNode.insertBefore(g, s);
})();
function OnClickLogin()
{
var userEmail = document.getElementById('txt_userName').value;
//alert(userEmail);
_paq.push(['setCustomVariable', 1, 'UserEmail', userEmail, 'visit']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
}
</script>
<noscript><p><img src="http://192.168.1.82:8081/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
the issue is the the login user value is always overrides the old value.
I want to create asegment that make statictices for each login user in each login click.
<script type="text/javascript">
var _paq = _paq || [];
//_paq.push(['trackPageView']);
//_paq.push(['enableLinkTracking']);
(function () {
var u = (("https:" == document.location.protocol) ? "https" : "http") + "://192.168.1.82:8081/piwik/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', 1]);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.type = 'text/javascript';
g.defer = true; g.async = true; g.src = u + 'piwik.js'; s.parentNode.insertBefore(g, s);
})();
function OnClickLogin()
{
var userEmail = document.getElementById('txt_userName').value;
//alert(userEmail);
_paq.push(['setCustomVariable', 1, 'UserEmail', userEmail, 'visit']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
}
</script>
<noscript><p><img src="http://192.168.1.82:8081/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>