goals in the backend with PHP.
You can set custom variables for a
visit or a
page but not explicit for a goal:
What i researched so far:
piwik_log_conversion(where the goals are in)
Is it possible to add custom variables there too? Any plans or other ideas?
$track = new PiwikTracker(21, 'http://tracking.example.com/'); $track->setRequestTimeout(5); $track->setTokenAuth('myToken'); $track->setVisitorId($track->getVisitorId()); $track->setCustomVariable(1, 'plant', $dataLocation['site'], 'page'); $track->setCustomVariable(2, 'machine', $dataMachine['machine'], 'page'); $track->doTrackGoal(2, 1);
Custom variables of scope "visit" are copied over to the "Goal" scope when a goal conversion occurs.
I need in this case to be more explicit. I want
"page" variables inside the goal.
I have several goals, which can be achieved multiple times per visit, but the variables can/will change their values.