This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require("node-fetch"); | |
let clickId = 111450850; | |
winston.info("Trying to send cost data to adjust for click_id: " + clickId); | |
let data = { | |
cost_type: "cpi", | |
cost_currency: "usd", | |
cost_amount: "1.72", | |
cost_id: "jetfuel_" + clickId, | |
tag: "jetfuel" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH dates as ( | |
SELECT ds, row_number() OVER () as rnum | |
FROM generate_series( | |
date_trunc('month', now())::timestamp AT TIME ZONE 'PST', | |
date_trunc('month', now() + INTERVAL '1 month')::timestamp AT TIME ZONE 'PST', | |
'24 hours') | |
as ds | |
) | |
SELECT ds, goal, |