Articles on: Tracking Setup

Updating cost data for campaigns


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.


There are two ways to do this, each with its own tab:

  1. Simple Update -- one total cost for a segment of traffic
  2. Spreadsheet Upload -- upload a spreadsheet (e.g. CSV) of cost data, optionally segmented by tracking field, campaign ID or date


Simple updates

A simple update involves setting a cost for a generalised segment of traffic.


You enter a total cost for the matching traffic, and our system divides that cost evenly across all matching visitors.


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

  1. Choose the traffic source. You can only do one source at a time, because cost data must come from a specific traffic source right!
  2. Choose the funnel (optional)
  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. Make sure the timezone you pick matches the timezone used in the traffic source reporting, as you are trying to match the data here


Under Update Options you can also restrict the update to a single campaign ID or by attributes -- usually you won't need this unless you are updating one campaign at a time.


As below:



Once you have these settings correct, enter the total cost of your traffic, as from your traffic source reporting, and hit Update Traffic Cost [2].


Want to reset the cost of your traffic to zero? Enter 0.00 as your cost value and submit.


Example:

  • You select Google Ads, Funnel A, Yesterday and put $78.34
  • You click Update Traffic Cost
  • Our system queries your data and finds that for Funnel A, yesterday, for traffic source Google Ads, 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.


Segmented updates with Spreadsheet Upload

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


For Google Ads 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, go to the Spreadsheet Upload tab and select the time period. If your spreadsheet includes a date column, per-row dates will be used instead of this range.


Your file needs traffic_source_id and cost columns. Other columns (date, campaign ID, tracking fields) are picked up from the headers, and tracking field columns use the tracking_field[cN] format, e.g. tracking_field[c2].


The easiest way to get this right is Generate Upload Template: pick your traffic source, toggle on the columns you want, choose the tracking field to segment by, then download the template:



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 Google Ads, we would go to the ads area, 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 keep just the ad ID and cost, which go into the template:



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, the file will literally contain the E+12 style data, which will not match data in FunnelFlux at all. Apparently Excel, after 20 years, is finally receiving an update that lets you turn this annoying automatic data typing feature off... yay! (but probably won't be the case in your app when reading this).


Now click Upload File and pick your spreadsheet. FunnelFlux shows the columns it detected and the rows it loaded, so you can review the data before clicking Update Costs:



This now gives FunnelFlux a set of segmented data to work with. It will go through your 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.


Spreadsheet requirements

It will be your responsibility to make sure the spreadsheet meets our data formatting requirements, as below:

  • Cost data should all be valid numbers. Any blank cost values will be removed when processing the uploaded file
  • The column header for cost must be cost not something else e.g. ad spend
  • Tracking field column headers must use the tracking_field[cN] format
  • All rows should have values in every cell, for the ones selected -- rows having any empty values will be removed
  • If segmenting by date, please use a common date format, not including times


On uploading, our system will provide error messages for common issues.


Note uploads are currently limited to 5000 rows.

Updated on: 15/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!