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

Re: Question about custom variable in Visitor Log.

$
0
0
Yes, as Matt said, this is the design. I needed to track users with multiple accounts, so this is what I used: one variable with visit scope, and one with page scope I only set at sign up/log in. Then, from the Live API I request:

&segment=customVariableName1=@User;customVariableValue1=@-'.$customer_id.'-'

(customer_id is enclosed in - - because search is based on LIKE), and then add

,customVariablePageName3==ID;customVariablePageValue3==$customer_id

(note the , in the beginning - means "OR").

So, you get everything about this user if the visit scope variable matches, or a page scope variable matches. You end up with the full session, including the parts where he was logged in with another account.

Viewing all articles
Browse latest Browse all 13117

Trending Articles