Views - Campaign Results
Recommended views to query campaign results with ease
Views are out-of-the-box data queries on top of the base structure of the data, providing easy access to common use cases required datasets and additional data useful to exploit the data lakes product fully.
Using views, Data lakes evolve while providing you with data contracts that will be kept and enable stable integrations with your internal platforms.
This table presents a row for each campaign occurance, on each KPI tracked by Optimove, on each lifecyclestage. Viewing a certain campaign occurrence performance can be achieved by summing [INCREASE_IN] for a selected KPI, from all lifecycle stages involved.
Each row represents an action within an occurrence of a campaign.
This view provides a more organized view of campaign results data. It will be kept in this structure and can be used to integrate additional tools to it.
VW_CAMPAIGN_RESULTS (v1.1)
-- FOR V1.1
SELECT *
FROM [SHARED_DB].[BI].[VW_CAMPAIGN_RESULTS]
Useful Queries
Scheduled campaigns summary divided by test & control groups
SELECT
a.PLAN_ID,
CASE
WHEN b.MARKETING_ACTION_NAME = 'DN' THEN 'Control'
ELSE b.MARKETING_ACTION_NAME
END AS MARKETING_ACTION_NAME,
COUNT(a.PLAN_DETAIL_ID) AS Total_Campaigns,
SUM(a.PLAN_GROUPSIZE) AS Total_Group_Size,
SUM(a.PLAN_DETAIL_NUMBER_OF_RESPONDENTS) AS Total_Respondents,
SUM(a.INCREASE_IN) AS Total_Increase_In,
AVG(a.INCREASE_PER_CUSTOMER) AS Average_Increase_Per_Customer,
AVG(a.PLAN_DETAIL_RESPONSE_RATE) AS Average_Response_Rate,
AVG(a.PLAN_DETAIL_AVGVALUE) AS Average_Value,
AVG(a.PLAN_DETAIL_STDEV_VALUE) AS Average_StDev_Value,
AVG(a.PLAN_DETAIL_AVG_LOG_VALUE) AS Average_Log_Value,
AVG(a.PLAN_DETAIL_VAR_LOG_VALUE) AS Average_Var_Log_Value,
SUM(a.PLAN_DETAIL_NUMBER_OF_CLICKED_AND_RESPOND) AS Total_Clicked_And_Respond,
AVG(a.PLAN_DETAIL_AVG_VALUE_OF_CLICKED_AND_RESPOND) AS Average_Value_Of_Clicked_And_Respond
FROM
VW_CAMPAIGN_RESULTS a
JOIN
VW_SCHEDULED_CAMPAIGNS b
ON
a.PLAN_ID = b.PLAN_ID
AND a.PLAN_DETAIL_ID = b.PLAN_DETAIL_ID
GROUP BY
a.PLAN_ID,
CASE
WHEN b.MARKETING_ACTION_NAME = 'DN' THEN 'Control'
ELSE b.MARKETING_ACTION_NAME
END
ORDER BY
a.PLAN_ID, MARKETING_ACTION_NAME
LIMIT 1000;
Table Description
Field Name | Description | Data Type | Format |
---|---|---|---|
PLAN_ID | A Campaign's ID | String | |
EXECUTION_DATE | Campaign Occurrence day | Date | yyyy-mm-dd |
END_TEST_DATE | Last day of testing that is calculated into this campaign metrics | Date | yyyy-mm-dd |
TARGET_GROUP_NAME | Name of target group | String | |
LIFECYCLE_STAGE | Name of lifecycle stage | String | |
KPI | Name of the KPI represented in each row | String | |
IS_DEFAULT_KPI | Flag to indicate if KPI is default for this campaign | Boolean | |
KPI_DISTRIBUTION_TYPE | Type of KPI distribution | String | |
CAMPAIGN_TYPE | Type of campaign | String | |
TARGET_GROUP_PRIORITY | Priority of target group | Integer | |
IS_AUTO_PRIORITY | Flag to indicate if priority is auto-generated | Boolean | |
PLAN_GROUPSIZE | Size of target group according to plan | Integer | |
IS_AVERAGE_SIGNIFICANCE | Flag to indicate if average value is significant | Boolean | |
IS_RESPONSE_RATE_SIGNIFICANCE | Flag to indicate if response rate is significant | Boolean | |
INCREASE_IN | Increase in KPI | Float | |
INCREASE_PER_CUSTOMER | Increase in KPI per customer | Float | |
IS_COMPLETED | Flag to indicate if campaign is completed | Boolean | |
PLAN_DETAIL_ID | Campaign action ID | String | |
IS_CONTROL | Flag to indicate if target group is a control group | Boolean | |
PLAN_DETAIL_GROUP_SIZE | Size of target group according to plan occurrence | Integer | |
PLAN_DETAIL_NUMBER_OF_RESPONDENTS | Number of customers who responded to campaign occurrence | Integer | |
PLAN_DETAIL_RESPONSE_RATE | Response rate of campaign occurrence | Float | |
PLAN_DETAIL_AVGVALUE | Average value of campaign occurrence | Float | |
PLAN_DETAIL_STDEV_VALUE | Standard deviation of campaign occurrence | Float | |
PLAN_DETAIL_AVG_LOG_VALUE | Average logarithmic value of campaign occurrence | Float | |
PLAN_DETAIL_VAR_LOG_VALUE | Variance of logarithmic value of campaign occurrence | Float | |
PLAN_DETAIL_NUMBER_OF_CLICKED_AND_RESPOND | Number of customers who clicked and responded to campaign occurrence | Integer | |
PLAN_DETAIL_AVG_VALUE_OF_CLICKED_AND_RESPOND | Average value of customers who clicked and responded to campaign occurrence | Float |
Updated 5 months ago