Updating cost data for campaigns


By Zeno

updated 6 months ago

Whenever you run a campaign, typically your revenue data will be immediately accurate since its coming from real-time postback URLs or other tracking.

However, cost can be a little more awkward. If your traffic source is able to pass an accurate cost with each click, great! But most sources cannot, especially those where you pay on a CPM basis (per impression), as its mathematically nonsensical to calculate a cost-per-click each time a user clicks and advert, then pass it to the tracker.

The solution? You need to retroactively update costs.

You can do this in our Update Costs section.

The Update Costs Section

Here there are two modes for updating cost -- simple an advanced. They differ only by how you provide the cost data.

Firstly, go through these steps to define the conditions for your update:

  1. Choose the funnel
  2. Choose the traffic source. You can only do one source at a time, because cost data must come from a specific traffic source right!
  3. Select the time period that your cost data is coming from. We suggest doing regular updates for Yesterday so that you do daily updates, to keep your daily ROI data accurate.
  4. Make sure the timezone you pick matches the timezone used in the traffic source reporting, as you are trying to match the data here
  5. Select a campaign (optional) if necessary -- usually you won't need this unless you are updating one campaign at a time
  6. Lastly, select the update style. Usually you will want the option "I want to set total cost of the matching traffic". This is because you'll be uploading a total cost, and our system will then spread that cost out over all matching visitors.

As below:

Once you have these settings correct, enter the total cost of your traffic, as from your traffic source reporting, and hit update.


  • You select Funnel A, Facebook, Yesterday and put $78.34
  • You click update cost
  • Our system queries your data and finds that for Funnel A, yesterday, for traffic source Facebook, there was 491 visitors
  • From this we calculate an average cost of $78.34/491 = $0.1596
  • We apply this cost value to all matching 491 visitors

Now, this is just an approximation. It's impossible to know the exact true cost of each visitor, since at a traffic source it may vary per device type, OS, gender, age, placement, site ID, etc.

The best we can do is approximate BUT we can segment our data further to be a little more accurate, as below.

Using Advanced Mode for cost updating

For this, do the same as you do above for basic mode.

However, rather than putting a single total cost, we can segment the cost further based on data from the traffic source.

For Facebook for example, we would ideally segment all costs at the ad level.

For other sources we might want to segment at the creative level, or the site ID level, or perhaps the combo of both!

For this, select advanced mode. You'll be asked to select one or my custom fields, which are data fields from your selected traffic source:

This data passed from the traffic source has labelled all your users, so we can use it to apply segmented cost updates.

Now, carefully export data from your traffic source (e.g. a CSV) that segments by this parameter and provides cost data for the date range you selected.

For example with Facebook, we would go to the ads tab, show reporting for yesterday, edit the columns to show ad ID, then export to CSV.

That exported file would now contain many different columns including the ad ID and the spend column. We can then strip away the other columns and arrange them so we have cost on the left, ad ID on the right:

Delete columns and shift them around giving:

Note something important here -- Excel is doing its usual nonsense with truncating a large number and showing exponent form (E+XX). We don't want this at all. Right click the entire column > set it to Number with 0 decimal places:

If we don't do this, and we copy these cells to the clipboard, it will literally copy the E+12 style data, which will not match data in FunnelFlux at all.

Now that you have this set up, copy the columns. You can just select the columns to copy everything. Now in FunnelFlux, click the top left cell of the table. It will go blue, indicating its selected:

Now just hit Ctrl+V to paste!

You can then remove the top row, since we don't want/need this.

This now gives FunnelFlux a set of segmented data to work with. It will go through your funnel/traffic source/date range window, then further segment by ad ID and average the cost separately over each ad.

This way, the CPC on each visitor from each ad will be correct, rather than being the average of the entire spend from the traffic source.

For sources like push, pops, native, you can use the same approach but segment by something like site ID, publisher ID, etc.

Bare in mind there are limits to our cost upload feature at the moment, so try to keep these under 1,000 rows. We'll test/improve this later and likely provide a CSV upload feature instead, where you can pick the columns that are for cost, ad ID, etc. instead of having to manually manipulate the CSV and copy/paste into the UI.

Also, we are working on integration with Adcost.io, which will allow for automated cost updating from Snapchat, Facebook, and Bing on an hourly basis.

Did this answer your question?