setCustomVariable with async tracking code

I like to inlcude some custom data in my async tracking code.

I try


_paq.push(['setCustomVariable',1,'key' 'value'])

but doesn’t work. I get a


aU.slice is not a function

error with firebug

any suggestions?

Works for me if I insert a comma (,) between ‘key’ and ‘value’.

This is my actual code:


_paq.push(['setSiteId', 106],['setTrackerUrl', u+'piwik.php']);
_paq.push(['setCustomVariable',1,'iframe',(top.location != self.location)]);
_paq.push(['trackPageView']);

I want to check if it is open in an iframe.

I forgot the comma in the post

It seems the third parameter has to be a string


_paq.push(['setCustomVariable',1,'iframe',""+(top.location != self.location)]);

works for me