1. 程式人生 > >How do I measure the ROI of my Marketing Campaigns? Documentation

How do I measure the ROI of my Marketing Campaigns? Documentation

The purpose of marketing campaigns is to drive traffic to your store front. But how do you know which campaigns yield the most conversions or what channel across the campaigns were most effective?

This guide provides you with the tools to answer these questions with SQL so that your marketing team can reproduce the hit campaigns and consistently generate loyal customers.

Talk to a product specialist to learn how companies like Warby Parker and Crate & Barrel use a data warehouse to increase engagement and sales.

Analyze campaign performance

The goal of marketing campaigns is to drive engagement and conversions. Most commonly performed by attracting traffic to the site, these campaigns use UTM parameters for attribution. In our analysis, we’ll be heavily relying on UTM parameters to analyze not only campaign, but also channel performance.

For our analysis walkthrough, we’ll use fictitious e-commerce and marketing data from on-demand artisanal toast company, Toastmates.

Toastmates is currently running these two campaigns:

  • “National Toast Day”, where $5 off was applied if you made a purchase on that day

  • “A Toast To Your Friend”, where you can buy toast for a friend at $5 off

Each of these campaigns used a combination of channels. Here is a table with the channels and corresponding UTM parameters so when we build the SQL query, we can make sure all of the traffic sources are accounted for.

We’ll use SQL below to measure the performance of each campaign and what that means for future marketing activities.

Build the funnel

The following query creates a table where each row is a customer and the columns are the date time when a key funnel event happens that have the context_campaign_name to match that of the UTM_campaign . The key funnel events in this analysis are Store Visited(based on a page view to the store URL), Product Viewed , and Order Completed . Given that each channel may have some key top of the funnel action that is unique to itself, let’s save that analysis for when we’re analyzing across channels.

Feel free to copy and paste the below query for your analysis so long as you replace national-toast-day with your own UTM campaign parameter.

    with

    users as (
        select  
          from  toastmates.users
    ),

    page_viewed as (
        select  p.received_at as page_viewed_at,
                p.context_campaign_name,
                p.user_id
          from  toastmates.pages p
     left join  users u
            on  u.id = p.user_id
         where  p.context_campaign_name is not null
           and  p.url ilike '%toastmates.com/store%'
    ),

    product_viewed as (
        select  v.received_at as product_viewed_at,
                v.context_campaign_name,
                v.user_id
          from  toastmates.product_viewed v
     left join  users u
            on  u.id = v.user_id
    ),

    order_completed as (
        select  c.received_at as order_completed_at,
                c.context_campaign_name,
                c.user_id
          from  toastmates.order_completed c
     left join  users u
            on  u.id = c.user_id
    )

        select  p.user_id as user_id,
                page_viewed_at,
                product_viewed_at,
                order_completed_at,
                p.context_campaign_name
          from  page_viewed p
     left join  product_viewed v
            on  p.user_id = v.user_id
     left join  order_completed c
            on  p.user_id = l.user_id
      order by  5 desc

Here are the first four rows of the resulting table:

Then, we can use tweak the query above into the one below to perform some simple COUNT and SUM on the previous table to get conversion metrics as well as total revenue derived from the campaign.

    with

    users as (
        select  
          from  toastmates.users
    ),

    page_viewed as (
        select  p.received_at as page_viewed_at,
                p.context_campaign_name,
                p.user_id
          from  toastmates.pages p
     left join  users u
            on  u.id = p.user_id
         where  p.context_campaign_name is not null
           and  p.url ilike '%toastmates.com/store%'
    ),

    product_viewed as (
        select  v.received_at as product_viewed_at,
                v.context_campaign_name,
                v.user_id
          from  toastmates.product_viewed v
     left join  users u
            on  u.id = v.user_id
    ),

    order_completed as (
        select  c.received_at as order_completed_at,
                c.context_campaign_name,
                c.total,
                c.user_id
          from  toastmates.order_completed c
     left join  users u
            on  u.id = c.user_id
    )

        select  p.context_campaign_name,
                count(page_viewed_at) as store_visits,
                count(product_viewed_at) as product_views,
                count(order_completed_at) as orders_completed,
                sum(total) as total_revenue
          from  page_viewed p
     left join  product_viewed v
            on  p.user_id = v.user_id
     left join  order_completed c
            on  p.user_id = l.user_id
      group by  5
      order by  5 desc

Here is the resulting table:

This analysis not only gives us a great snapshot of the conversion points along each campaign’s funnel, but also shows that we’ve generated $3,100.37 from the National Toast Day campaign and $3,824.68 from the Toast Your Friend campaign. Also we can see that the quality of the traffic from the National Toast Day is higher, but we’ve had more total traffic from Toast Your Friend, which makes sense since it’s an ongoing campaign.

But this is not yet ROI, since we haven’t incorporated the spend—the labor of your marketing team and the paid acquisition channels to source part of this traffic—that went into these channels.

Add campaign costs

The main costs that are incorporated in an ROI calculation are salaries (pro-rated by person-hour) and media spend. While we could conceivably create a custom, static table in SQL that contains the spend information over time, the faster and more practical way would be a back of the envelope calculation.

The costs associated with a given campaign consist of two major pieces: the person-hour cost and any associated media spend.

  • Calculating the pro-rated person-hour is an estimate of the number of hours and people used to setup and manage the campaign, then multiplied by the hourly rates based off their annual salaries.

  • The media spend is the advertising cost for distributing creatives to generate traffic to your store

When we have the aggregate cost numbers, the formula for ROI is:

Campaign ROI = (Profit Attributed to Campaign – Campaign Cost) / Campaign Cost

Here is a spreadsheet to illustrate the ROI calculation for both campaigns:

Though ROI numbers are one success metric, it’s an important benchmark for comparing performance when launching new campaigns or comparing against past campaigns.

But how can we go one step further and see what worked and what didn’t? One approach is to see which channels convert better, so you know how to adjust your marketing spend or media buys in your current campaigns or future ones.

Analyze channel performance

A single campaign can include a wide variety of channels: email, display ads, push notifications, forums, etc. all of which yields different engagement and conversion rates. Effective marketers will keep a pulse on each channel throughout the duration of the campaign to understand whether a target audience is being saturated, a creative refresh is needed (for advertising), or how to efficiently allocate future spend towards a source that converts.

The analysis is similar to measuring the performance across a single campaign, with the only change being finding events where we focus on context_campaign_medium or context_campaign_source instead of context_campaign_name . The SQL below measures the conversion rates at key funnel events for national-toast-day , but broken down by utm_medium .

You can copy the below into your favorite editor, as long as you change out the context_campaign_name and context_campaign_medium parameters to ones that applies to your business.

    with

    users as (
        select  *
          from  toastmates.users
    ),

    page_viewed as (
        select  p.received_at as page_viewed_at,
                p.context_campaign_name,
                p.user_id
          from  site.pages p
     left join  users u
            on  u.id = p.user_id
         where  p.context_campaign_name = 'national-toast-day'
           and  p.context_campaign_medium is not null
           and  p.url ilike '%toastmates.com/store%'
    ),

    product_viewed as (
        select  v.received_at as product_viewed_at,
                v.context_campaign_medium,
                v.user_id
          from  toastmates.product_viewed v
     left join  users u
            on  u.id = v.user_id
    ),

    order_completed as (
        select  c.received_at as order_completed_at,
                c.context_campaign_medium,
                c.user_id,
                c.total
          from  toastmates.order_completed c
     left join  users u
            on  u.id = c.user_id
    )

        select  p.context_campaign_medium as utm_medium,
                count(page_viewed_at) as store_visits,
                count(product_viewed_at) as product_views,
                count(order_completed_at) as orders_completed,
                sum(c.total) as total_revenue
          from  page_viewed p
     left join  product_viewed_at v
            on  p.user_id = c.user_id
     left join  order_completed c
            on  p.user_id = c.user_id
      group by  1
      order by  1 desc

The resulting table:

Since the National Toast Day campaign is relatively new, the majority of the traffic is from the email and an article (“news”). But we can see that the social channels have a lower conversion from store visits to product views. Email has the best overall conversion to revenue, which may be attributed to the recipients already familiar with the Toastmates brand or having previously had a stellar end-to-end shopping experience.

We can further breakdown this analysis by seeing which email, display ads, and social channels performed the best, by adding utm_source and utm_content ,assuming that you’ve properly added them in your earned and paid media links. Also note that this preliminary analysis in SQL doesn’t account for double-counted users, who had impressions with our brand on multiple channels (e.g. someone seeing a display ad, yet converted on the email outreach). Fortunately, there are multi-touch attribution models that can be applied to better understand the weights of each activity towards conversion.

Build repeatable hit marketing campaigns

Measuring the ROI and performance of marketing campaigns and marketing channels tells a compelling story about what types of campaigns resonate with your audience. How does your audience like to be engaged? Text, push notifications, email? What campaign messaging hooks work the best in getting them back at your store?

You can apply this analytical approach and performance measurement techniques to a wide variety of marketing activities, such as offline marketing, billboards, or sponsoring events. These insights can empower your team to focus on what works and eliminate what doesn’t.

Talk to a product specialist to learn how companies like Warby Parker and Crate & Barrel use a data warehouse to increase engagement and sales.

If you have any questions, or see anywhere we can improve our documentation, please let us know!

相關推薦

How do I measure the ROI of my Marketing Campaigns? Documentation

The purpose of marketing campaigns is to drive traffic to your store front. But how do you know which campaigns yield the most conversions or what channel

【轉】How do I set the real time scheduling priority of a process?

In the event that a process is not achieving the desired performance performance benchmarks, it can be helpful to set CPU affinity, real

How do I measure my advertising funnel? Documentation

However, it’s surprisingly hard to answer questions about the ROI of your ad campaigns, and many technical marketers aren’t able to dig into the numbers wi

how do I access the EC Embedded Controller firmware level with wmi win32?

Imports System Imports System.Management Imports System.Windows.Forms Namespace WMISample Public Class MyWMIQuery Public Overloads Shar

怎樣通過程式碼開啟或者關閉瀏覽器控制檯?-How do I close the browser console with code in the console

see:https://stackoverflow.com/questions/25515697/how-do-i-close-the-browser-console-with-code-in-the-console?r=SearchResults 據我所知,沒有一個瀏覽器允許通過程式碼

[iOS] How do I save user preferences for my iPhone app?

One of the easiest ways would be saving it in the NSUserDefaults: Setting: NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; [userD

How can I automate the scheduling of instructors / classes in shared spaces?

I need to automate the scheduling of instructors, who teach one or more classes, in shared rooms (whose schedule is out of my control and changes daily).In

Ask HN: How can I see the value of Scrum?

Purely my own opinions:I feel like scrum gives a lot of benefits from the top end of the organization -- it generates predictable results, there's a clear

Ask HN: How do I make the most money as a programmer

I was wondering what the path is to maximize my income to the effort put in. Is it actually the salary route at a large company? Start ups seem to be the w

How AI Will Change The Future of Content Marketing

Content marketing is one of the hottest areas of digital marketing, but content marketers are overwhelmed by demand. How will content marketers adapt and k

【轉】How can I check the port status of my fibre channel HBA?

https://access.redhat.com/solutions/528683 How can I check the port status of my fibre channel HBA?  SOLUTION UNVERIFIED - 已更新 2017

How do I check if a type is a subtype OR the type of an object?

option parent ive nbsp operate asp tel get another How do I check if a type is a subtype OR the type of an object? To check if a type

Dissecting the Disruptor: How do I read from the ring buffer?

作者:Trisha The next in the series of understanding the Disruptor pattern developed at LMAX. After the last post we all understand ring buffers and

How do I delete my HN account and history?

Not that I particularly wish to at all...but, given recent issues across social networks...I would like to know what steps it would take to remove my ident

Ask HN: My school makes us use Chrome, how do I mitigate privacy loss?

My high school (Lewiston High School, 04240) makes us use Google Chromebooks and unfortunately Chrome just auto-updated to 69. We /have/ to use Chrome and

How to Prove the ROI of Computer Vision Moderation

While other forms of AI are still in their infancy, one field of AI is already in practical use by businesses: computer vision. Computer vision (CV) has al

I've deleted my default VPC. How do I get it back?

Amazon Web Services is Hiring. Amazon Web Services (AWS) is a dynamic, growing business unit within Amazon.com. We are currently hiring So

How do I find out my usage data? Documentation

If you have questions about your data usage or how it relates to your bill, we recommend logging into your Segment workspace, clicking on the top left arro

How do I find my source slug? Documentation

Your source slug can be found in the URL when you’re looking at the source destinations page or live debugger. The URL structure will look like this:If you

How do I find my write key? Documentation

The write key is a unique identifier for your Source. It lets Segment know which Source is sending the data and therefore which destinations should receive