setCustomData


#1

Hi all together,

we have developed our own ads-Server. Until now we also track all banners by our own. But now we want to track everything with piwik.
Page tracking itself works fine.
But if we want to track some banners with setCustomData, than nothing happens.


<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://xxx/piwik/" : "http://xxx/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 6);

var customUserTracking = {"uid": "something"};
piwikTracker.setCustomData(customUserTracking);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
}
catch( err )
{}
</script><noscript><p><img src="http://xxx/piwik/piwik.php?idsite=6" style="border:0" alt="" /></p></noscript>


It is very confusing, there will be stored nothing in the database.
We using piwik 1.1.1.

May someone help us found this strange error.

Thanks in advance.
Regards
metan


(vipsoft) #2

Piwik doesn’t know if the customData should be persistent or is transient. This is left as an exercise for the plugin developer.

Perhaps you’ll be more interest in customVariables being developed in trunk?