-
-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #613
- Loading branch information
Showing
8 changed files
with
57 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
drop table campaign_stats; -- Wasn't correct before, so just drop it. | ||
|
||
create table campaign_stats ( | ||
site_id integer not null, | ||
path_id integer not null, | ||
|
||
day date not null, | ||
campaign_id integer not null, | ||
ref varchar not null, | ||
count integer not null, | ||
count_unique integer not null, | ||
|
||
constraint "campaign_stats#site_id#path_id#campaign_id#ref#day" unique(site_id, path_id, campaign_id, ref, day) {{sqlite "on conflict replace"}} | ||
); | ||
create index "campaign_stats#site_id#day" on campaign_stats(site_id, day desc); | ||
{{cluster "campaign_stats" "campaign_stats#site_id#day"}} | ||
{{replica "campaign_stats" "campaign_stats#site_id#path_id#campaign_id#ref#day"}} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Campaigns are tracked automatically based on URL query parameters: | ||
|
||
- The campaign name is in the `utm_campaign` or `campaign` parameter. | ||
|
||
- An optional source can be in the `utm_source`, `ref`, `src`, or `source` | ||
parameter (it will use the Referrer if this is missing). | ||
|
||
There is no need to "create" campaigns; once it sees a campaign with a new name | ||
it will be created automatically and shown in the Campaigns dashboard widget. | ||
|
This file contains 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