Skip to content

Commit

Permalink
Add additional columns to account analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
NiallRees committed Dec 1, 2021
1 parent 74ca38d commit 1ec2516
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions tap_pinterest_ads/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,36 +249,37 @@ def get_url_params(
return params

ACCOUNT_ANALYTICS_COLUMNS = [
"SPEND_IN_DOLLAR", "ECPC_IN_DOLLAR", "CTR", "ECTR", "ECPE_IN_DOLLAR",
"ENGAGEMENT_RATE", "EENGAGEMENT_RATE", "REPIN_RATE", "CTR_2", "CAMPAIGN_ID",
"AD_GROUP_ID", "CAMPAIGN_ENTITY_STATUS",
"CPM_IN_DOLLAR", "AD_GROUP_ENTITY_STATUS", "TOTAL_CLICKTHROUGH",
"TOTAL_IMPRESSION_FREQUENCY", "TOTAL_ENGAGEMENT_SIGNUP",
"TOTAL_ENGAGEMENT_CHECKOUT", "TOTAL_CLICK_SIGNUP", "TOTAL_CLICK_CHECKOUT",
"TOTAL_VIEW_SIGNUP", "TOTAL_VIEW_CHECKOUT", "TOTAL_CONVERSIONS",
"TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR",
"TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
"TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR",
"TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
"TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR",
"TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_PAGE_VISIT",
"TOTAL_SIGNUP", "TOTAL_CHECKOUT", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR",
"TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "PAGE_VISIT_COST_PER_ACTION",
"PAGE_VISIT_ROAS", "CHECKOUT_ROAS", "VIDEO_3SEC_VIEWS_2",
"VIDEO_P100_COMPLETE_2", "VIDEO_P0_COMBINED_2", "VIDEO_P25_COMBINED_2",
"VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2",
"VIDEO_MRC_VIEWS_2", "ECPV_IN_DOLLAR", "ECPCV_IN_DOLLAR",
"ECPCV_P95_IN_DOLLAR", "TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_P100_COMPLETE",
"TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P25_COMBINED",
"TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED",
"TOTAL_VIDEO_P95_COMBINED", "TOTAL_VIDEO_MRC_VIEWS",
"TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND",
"TOTAL_REPIN_RATE", "WEB_CHECKOUT_COST_PER_ACTION", "WEB_CHECKOUT_ROAS",
"TOTAL_WEB_CHECKOUT", "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
"TOTAL_WEB_CLICK_CHECKOUT", "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
"TOTAL_WEB_ENGAGEMENT_CHECKOUT",
"TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
"TOTAL_WEB_VIEW_CHECKOUT", "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR"
"AD_GROUP_ENTITY_STATUS", "CAMPAIGN_DAILY_SPEND_CAP",
"CAMPAIGN_ENTITY_STATUS", "CAMPAIGN_ID", "CAMPAIGN_LIFETIME_SPEND_CAP", "CAMPAIGN_NAME",
"CHECKOUT_ROAS", "CLICKTHROUGH_1", "CLICKTHROUGH_1_GROSS", "CLICKTHROUGH_2",
"CPC_IN_MICRO_DOLLAR", "CPM_IN_DOLLAR", "CPM_IN_MICRO_DOLLAR", "CTR", "CTR_2",
"ECPCV_IN_DOLLAR", "ECPCV_P95_IN_DOLLAR", "ECPC_IN_DOLLAR", "ECPC_IN_MICRO_DOLLAR",
"ECPE_IN_DOLLAR", "ECPM_IN_MICRO_DOLLAR", "ECPV_IN_DOLLAR", "ECTR", "EENGAGEMENT_RATE",
"ENGAGEMENT_1", "ENGAGEMENT_2", "ENGAGEMENT_RATE", "IDEA_PIN_PRODUCT_TAG_VISIT_1",
"IDEA_PIN_PRODUCT_TAG_VISIT_2", "IMPRESSION_1", "IMPRESSION_1_GROSS", "IMPRESSION_2",
"INAPP_CHECKOUT_COST_PER_ACTION", "OUTBOUND_CLICK_1", "OUTBOUND_CLICK_2",
"PAGE_VISIT_COST_PER_ACTION", "PAGE_VISIT_ROAS", "PAID_IMPRESSION", "PIN_ID", "REPIN_1",
"REPIN_2", "REPIN_RATE", "SPEND_IN_DOLLAR", "SPEND_IN_MICRO_DOLLAR", "TOTAL_CHECKOUT",
"TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICKTHROUGH", "TOTAL_CLICK_CHECKOUT",
"TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_CLICK_SIGNUP",
"TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_CONVERSIONS", "TOTAL_CUSTOM",
"TOTAL_ENGAGEMENT", "TOTAL_ENGAGEMENT_CHECKOUT",
"TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_ENGAGEMENT_SIGNUP",
"TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT",
"TOTAL_IMPRESSION_FREQUENCY", "TOTAL_IMPRESSION_USER", "TOTAL_LEAD", "TOTAL_PAGE_VISIT",
"TOTAL_REPIN_RATE", "TOTAL_SIGNUP", "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR",
"TOTAL_VIDEO_3SEC_VIEWS", "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND", "TOTAL_VIDEO_MRC_VIEWS",
"TOTAL_VIDEO_P0_COMBINED", "TOTAL_VIDEO_P100_COMPLETE", "TOTAL_VIDEO_P25_COMBINED",
"TOTAL_VIDEO_P50_COMBINED", "TOTAL_VIDEO_P75_COMBINED", "TOTAL_VIDEO_P95_COMBINED",
"TOTAL_VIEW_CHECKOUT", "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_VIEW_SIGNUP",
"TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CHECKOUT",
"TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_CLICK_CHECKOUT",
"TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_ENGAGEMENT_CHECKOUT",
"TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "TOTAL_WEB_VIEW_CHECKOUT",
"TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR", "VIDEO_3SEC_VIEWS_2", "VIDEO_LENGTH",
"VIDEO_MRC_VIEWS_2", "VIDEO_P0_COMBINED_2", "VIDEO_P100_COMPLETE_2", "VIDEO_P25_COMBINED_2",
"VIDEO_P50_COMBINED_2", "VIDEO_P75_COMBINED_2", "VIDEO_P95_COMBINED_2", "WEB_CHECKOUT_COST_PER_ACTION",
"WEB_CHECKOUT_ROAS"
]

class AccountAnalyticsStream(PinterestStream):
Expand All @@ -291,7 +292,6 @@ class AccountAnalyticsStream(PinterestStream):
replication_key = "DATE"
properties = [
Property("AD_ACCOUNT_ID", StringType),
Property("AD_ID", StringType),
Property("DATE", DateTimeType),
]
properties += [Property(a, NumberType) for a in ACCOUNT_ANALYTICS_COLUMNS]
Expand Down

0 comments on commit 1ec2516

Please sign in to comment.