trackGoal with page scope variable


#1

I’m having trouble set a goal triggered manually with custom variables.

I am using the following code:


_paq.push (['setCustomVariable', 1 'myVar', 'customValue', 'page']);
_paq.push (['trackGoal', 15]);

and try to see the report through a link similar to this:


?module=API&method=CustomVariables.getCustomVariables&format=JSON&idSite=1&period=day&date=2014-04-10&expanded=1&segment=customVariablePageValue1==customValue

I do not have any data.

However, if I change the scope of the variable to visit, everything works perfectly.


_paq.push (['setCustomVariable', 1 'myVar', 'customValue', 'page']);
_paq.push (['trackGoal', 15]);

Report URL:


?module=API&method=CustomVariables.getCustomVariables&format=JSON&idSite=1&period=day&date=2014-04-10&expanded=1&segment=customVariableValue1==customValue

Why this don’t work with page scope?


#2

Ops,
wrong code!

Don’t work:


_paq.push (['setCustomVariable', 1 'myVar', 'customValue', 'page']);
_paq.push (['trackGoal', 15]);

Report URL:

?module=API&method=CustomVariables.getCustomVariables&format=JSON&idSite=1&period=day&date=2014-04-10&expanded=1&segment=customVariablePageValue1==customValue

Work!


_paq.push (['setCustomVariable', 1 'myVar', 'customValue', 'visit']);
_paq.push (['trackGoal', 15]);

Report URL:


?module=API&method=CustomVariables.getCustomVariables&format=JSON&idSite=1&period=day&date=2014-04-10&expanded=1&segment=customVariableValue1==customValue

#3

don’t need anymore!
problem solved!
tks.