Order Channel and Marketing Code

This page provides detailed instructions on the Order Channel and Marketing Code transform code block and what should be added to the Script Manifest file in order to execute the code

Script Manifest File (YML)

Upstream Transformation Dependencies

This block is dependent on the following blocks being implemented:

  • Initialization

  • UOS

  • Google Analytics

Transformation Code Requirements

The following code should be added to the main workflow in the appropriate position, after Order Status and before Daily Plan per the Transform Code Sequence - DRP page

  #--------------------------------------------------------------------------------------------------------------------
  # SECTION: 3000_CHANNEL AND 3400_MARKETING
  # DEPENDENCIES:
  #   - Section: 0500_UOS
  #   - Section: 2600_GA
  # OPTIONAL:
  #   - Integration: Fairing (Enquire Labs) if want to use in channel mapping
  # REQUIRED: No
  # PURPOSE: This code creates the DRP tables for order channel and should be turned on once UOS and GA are turned on
  #--------------------------------------------------------------------------------------------------------------------
  order_channel_source:
    integrations:
      - google_analytics
    scripts:
      - "github://platform-sql-shared/scripts/base/3000_channel/3010_CHN_BAS_order_channel_source.sql"

  order_channel_enquire:
    integrations:
      - enquire_labs
    scripts:
      - "github://platform-sql-shared/scripts/base/3000_channel/3015_CHN_BAS_enquire_channel_source.sql"

  order_channel_source_pt2:
    integrations:
      - google_analytics
    scripts:
      - "github://platform-sql-shared/scripts/base/3000_channel/3020_CHN_BAS_discount_code_mapping.sql"
      - "github://platform-sql-shared/scripts/base/3000_channel/3040_CHN_BAS_order_channel_influencer_discount_code.sql"
      - "github://platform-sql-shared/scripts/base/3000_channel/3050_CHN_BAS_order_channel_influencer_utm.sql"
      - "github://platform-sql-shared/scripts/base/3000_channel/3060_CHN_BAS_order_channel_source_insert.sql"

  order_channel:
    integrations:
      - google_analytics
    scripts:
      - "github://platform-sql-shared/scripts/base/3000_channel/3070_CHN_BAS_multi_channel_prep.sql"
      - "github://platform-sql-shared/scripts/base/3000_channel/3280_CHN_BAS_order_channel.sql"
      - "github://platform-sql-shared/scripts/base/3400_marketing/3410_MKT_BAS_multi_channel_transactions.sql"

Order Channel and Marketing

Add these scripts to build the [drp.order_channel] table which provide a default Google Analytics, first-click, last-click and Daasity view of order attribution.

For those with Fairing add the Enquire Labs block to include survey based answers in the attribution

Code to support the Attribution Settings functionality is part of the Channel Attribution Data Mart and not in this section

This script creates the [drp.order_channel_source] that creates one record per order for each data source of attribution and allows us to select the appropriate attribution for the Daasity view

Optional script to include if you have Fairing as an integration

Scripts to include different attribution methods

Script to populate the final [drp.order_channel] table

Optional script to analyze multi-touch orders

Last updated