Hello: Can someone please help me with this issue.
All our campaigns begin with a date
"20200312_NEWS_....."
I want to be able to get "New User" information for a 7 day period (i. 2020-03-12 to 2020-03-19)
How can I automate this process? I have 100's of these campaigns. I know my start date because its in the campaign name. I know my end date because its just +7.
I want to do dumb it down like: Start_Date = Left(trafficSource.campaign,8) End_Date=Left(trafficSource.campaign,8) +7. But then how do i tell it to give me info of new users from Start_Date to End_Date. [enter image description here][1]
This is my very basic code:
SELECT trafficSource.campaign AS Campaign,
-- New Users (metric) COUNT(DISTINCT( CASE WHEN totals.newVisits = 1 THEN fullVisitorId ELSE NULL END )) AS New_Users
FROM
Table_1.ga_sessions_*
WHERE totals.visits = 1 and _table_suffix BETWEEN '20200101' AND '20201231'
GROUP BY trafficSource.campaign