Package org.apache.unomi.api.goals
Class Goal
- java.lang.Object
-
- org.apache.unomi.api.Item
-
- org.apache.unomi.api.MetadataItem
-
- org.apache.unomi.api.goals.Goal
-
- All Implemented Interfaces:
Serializable
public class Goal extends MetadataItem
A tracked activity / action that can be accomplished by site (scope) visitors. These are tracked in general because they relate to specific business objectives or are relevant to measure site/scope performance. Goals can be defined at the scope level or in the context of a particularCampaign
. Either types of goals behave exactly the same way with the exception of two notable differences:- duration: scope-level goals are considered until removed while campaign-level goals are only considered for the campaign duration
- audience filtering: any visitor is considered for scope-level goals while campaign-level goals only consider visitors who match the campaign's conditions
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ITEM_TYPE
-
Fields inherited from class org.apache.unomi.api.MetadataItem
metadata
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCampaignId()
Retrieves the identifier of the campaign this goal is part of, if any.Condition
getStartEvent()
Retrieves theCondition
determining the goal's start event if any, used for more complex goals where an action has to be accomplished first before evaluating the success of the final goal (funnel goal for example).Condition
getTargetEvent()
Retrieves theCondition
determining the target event which needs to occur to consider the goal accomplished.void
setCampaignId(String campaignId)
void
setStartEvent(Condition startEvent)
void
setTargetEvent(Condition targetEvent)
-
Methods inherited from class org.apache.unomi.api.MetadataItem
getMetadata, getScope, setMetadata
-
Methods inherited from class org.apache.unomi.api.Item
equals, getItemId, getItemType, getItemType, getSystemMetadata, getVersion, hashCode, setItemId, setItemType, setScope, setSystemMetadata, setVersion
-
-
-
-
Field Detail
-
ITEM_TYPE
public static final String ITEM_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Goal
public Goal()
-
Goal
public Goal(Metadata metadata)
-
-
Method Detail
-
getStartEvent
public Condition getStartEvent()
Retrieves theCondition
determining the goal's start event if any, used for more complex goals where an action has to be accomplished first before evaluating the success of the final goal (funnel goal for example).- Returns:
- the condition associated with the start event for this goal or
null
if no such event exists
-
setStartEvent
public void setStartEvent(Condition startEvent)
-
getTargetEvent
public Condition getTargetEvent()
Retrieves theCondition
determining the target event which needs to occur to consider the goal accomplished.- Returns:
- the condition associated with the event determining if the goal is reached or not
-
setTargetEvent
public void setTargetEvent(Condition targetEvent)
-
getCampaignId
public String getCampaignId()
Retrieves the identifier of the campaign this goal is part of, if any.- Returns:
- the identifier of the campaign this goal is part of, or
null
if this goal is not part of any campaign
-
setCampaignId
public void setCampaignId(String campaignId)
-
-