I have the following query which works (in pseudo-query with annotations):
# 1. This first search returns the total number of free account signups from 28 days ago.
index=site
source="/source/signup.log"
conversion="signup"
earliest=-28d@d
latest=-27d@d
plan="free" |
stats count as NewSignUps |
# 2. This appended search looks for all upgrade events that occurred in the past 28 days.
appendcols [
search
index=site
source="/source/upgrade.log"
status="upgrade"
earliest=-28d@d
latest=-0d@d
# 3. This subsearch returns all of the profileIds of those users who created a free account from 28 days ago. The same search in #1 above. This subsearch pipes those profileIds into the search above.
[ search
index=site
source="/source/signup.log"
conversion="signup"
earliest=-28d@d
latest=-27d@d
plan="free" |
table profileId ] |
# 4. This returns the number of free accounts created 28 days ago and then converted in the 28 day period since.
stats count as NumberOf28DayUpgradeConversions ] |
# 5. This evaluates the conversion rate.
eval 28DayConversionRate = round(100*NumberOf28DayUpgradeConversions/NewSignUps,2)."%" |
# 6. This displays the conversion rate.
table 28DayConversionRate
The query works fine but since the date parameters are hardcoded, it only works on the day that you run the query. I would love to be able to run this query but for a time range so that you can see on any arbitrary date what that 28 day conversion rate looks like.
Is it possible to modify this query to parameterize the date attributes so I can create this report over an arbitrary time period?
... View more