Clean Facebook Data & Calculate Daily Ad Spend
Overview:
π Outcome: Visualized Google & Facebook Ads Cost
π Estimated Time: ~30min
π Structure:
- Clean Facebook Data
- Combine Google and Facebook Data
- Visualize Data
π· End Result:

Clean Facebook Data
π₯ Video Explanation:
|
|
|
|
π Step by Step:
|
- Open the Model from 1.2
- Insert Input Node and select Facebook Ads: ads_insights
- Use a Fields Node to drop and Rename Columns; We would recommend renaming:
- date_start -> date
- Change Field Types: date column
-
Add Text Extraction Node to drop the information on the time (Value Type: INDEX, Condition: BEFORE, Value: 11)
-
Add Date Parser node to convert the type of the date column from text to date
|
Combine Google and Facebook Data
π₯ Video Explanation:
|
|
|
|
π Step by Step:
|
-
Use a Functions Node to create new column ('platform') and put as function: "Facebook"
Moving over to the Google Data
-
Disconnect the Output node from the Google Date Parser node
-
Put a Functions Node after the Date Parser and create a new column ('platform') and put as the function: "Google"
-
Use a "Union" Node and connect it to both date Node Chains to put the data from both input sources under each other
-
Connect the Union Node with the output node
-
Click on the Output Node and select the columns that you want to use in the Output
-
Commit the Model

|
Visualize Data
π₯ Video Explanation:
|
|
|
|
π Step by Step:
|
- Go to the Modeling Section and create a new dashboard
- Add a widget and select the "Daily Ad spend" table as an input
- Drag and drop the columns into the fields:
- Segment by: Date of date - Breakdown by: platform - Summarize by: Sum of Spend
|
π₯³ Congrats! You finished the first module!
(Stay tuned - More modules are coming soon... π)
Was this article helpful?
3 out of 3 found this helpful