com.ibm.commerce.bi.taglib

Class CampaignBaseTag

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag


    public class CampaignBaseTag
    extends BaseTag

    An abstract tag class which generates the data required for an analytics vendor to trigger a campaign view event. The generated data is placed in a HashMap object named paramMap which the analytics vendor classes can consume.

    Following is the structure of the HashMap object incase the emarketing spot is showing a marketing experiment. The keys used in the map are defined in the TagConstants class.

     +--------------------------------------------------------------------------+
     | EXPERIMENT_FLAG              | A boolean flag which indicates the data   |
     |                              | with belongs to a marketing experiment    |
     +--------------------------------------------------------------------------+
     | EXPERIMENT_NAME              | The experiment name                       |
     +--------------------------------------------------------------------------+
     | EXPERIMENT_VIEWED            | Whether the experiment viewed is a test   |
     |                              | or control element. The value 
     +--------------------------------------------------------------------------+
     | ACTIVITY_NAME                | The name of the activity to which the     |
     |                              | experiment belong
     +--------------------------------------------------------------------------+
     | EXPERIMENT_ELEMENT_NAME      | The experiment element name               |
     +--------------------------------------------------------------------------+
     

    Following is the structure of the HashMap object for other web/email activities. The keys used in the map are defined in the TagConstants class.

     +--------------------------------------------------------------------------+
     | EXPERIMENT_FLAG              | A boolean flag which indicates the data   |
     |                              | with belongs to a marketing experiment    | 
     +--------------------------------------------------------------------------+
     | CAMPAIGN_NAME                | The name of the campaign                  |
     +--------------------------------------------------------------------------+
     | ACTIVITY_NAME                | The name of the activity                  |
     +--------------------------------------------------------------------------+
     | CAMPAIGN_TYPE                | The type of campaign. Value 'WEB' for web |
     |                              | activities and 'EMAIL' for email          | 
     |                              | activities                                |
     +--------------------------------------------------------------------------+
     | ESPOT_NAME                   | The name of the emarketing spot           |                   
     +--------------------------------------------------------------------------+
     | CONTENT_NAME                 | The name of the content                   |
     +--------------------------------------------------------------------------+
     
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor and Description
      CampaignBaseTag()
      Constructor
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CampaignBaseTag

        public CampaignBaseTag()
        Constructor
    • Method Detail

      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Gathers the data required for generating an analytics campaign view event and places that in an attribute for the vendor specific classes to consume.
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class BaseTag
        Returns:
        always EVAL_PAGE constant
        Throws:
        javax.servlet.jsp.JspException - on any Exception
      • setDatabean

        public void setDatabean(EMarketingSpot databeanVar)
        Sets the EMarketingSpot databean to be used for generating the campaign data
        Parameters:
        databeanVar - The EMarketingSpot databean
      • setInitiative

        public void setInitiative(java.lang.Integer initiativeVar)
        Sets the initiativeId
        Parameters:
        initiativeVar - The initiativeId
      • setEspotData

        public void setEspotData(MarketingSpotDataType espotDataVar)
        Sets the MarketingSpotDataType SDO to be used for generating the campaign data
        Parameters:
        espotDataVar - The MarketingSpotDataType SDO
      • setEspotDataJSON

        public void setEspotDataJSON(java.util.HashMap espotDataJSONVar)
        Sets the MarketingSpotData JSON object to be used to get the data for analysis
        Parameters:
        espotDataJSONVar - The MarketingSpotData JSON object to set.
      • setName

        public void setName(java.lang.String nameVar)
        Sets the content name that should be used
        Parameters:
        nameVar -
      • setActivityName

        public void setActivityName(java.lang.String nameVar)
        Sets the activity name that should be used
        Parameters:
        nameVar -
      • setCampaignName

        public void setCampaignName(java.lang.String nameVar)
        Sets the campaign name that should be used
        Parameters:
        nameVar -
      • setExperimentName

        public void setExperimentName(java.lang.String nameVar)
        Sets the experiment name that should be used
        Parameters:
        nameVar -
      • setTestElementName

        public void setTestElementName(java.lang.String nameVar)
        Sets the test element name that should be used
        Parameters:
        nameVar -
      • setControlElement

        public void setControlElement(java.lang.String controlVar)
        Sets if the test element is the control element
        Parameters:
        controlVar -
      • setMarketingSpotName

        public void setMarketingSpotName(java.lang.String nameVar)
        Sets the e-Marketing spot name that should be used
        Parameters:
        nameVar -
      • getParamMap

        public java.util.HashMap<java.lang.String,java.lang.Object> getParamMap()
        Gets the map which contains the campaign data
        Returns:
        paramMap The map which contains the campaign data