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
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 particular
Campaign
. 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:
-
Field Summary
FieldsFields inherited from class org.apache.unomi.api.MetadataItem
metadata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the identifier of the campaign this goal is part of, if any.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).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 Details
-
ITEM_TYPE
- See Also:
-
-
Constructor Details
-
Goal
public Goal() -
Goal
-
-
Method Details
-
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
-
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
-
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
-