Skip to content

Commit

Permalink
Guidance added for adding analytics to specific versions in the database
Browse files Browse the repository at this point in the history
  • Loading branch information
VulpesFerrilata committed Jun 20, 2023
1 parent adbd8e7 commit 6aec47e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/db/analytics-definitions.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Analytics definitions

The `AnalyticsDefinitions` table contains details about supported analytics tools for adding analytics functionality to the site.
The `AnalyticsDefinitions` table contains details about supported analytics tools for adding analytics functionality to the site. The `VersionAnalytic` table specifies which versions to apply the analytics to (default is to be applied to all versions).

## Relevant tables

| Table Name | Description |
| --------------------------------- | ------------------------------------ |
| AnalyticsDefinitions | Contains the pre-defined analytics providers |
| AnalyticsDefinitions | Contains the pre-defined analytics providers |
| VersionAnalytic | Contains specified versions for using analytics |

### AnalyticsDefinitions

Expand All @@ -17,3 +18,14 @@ This table contains the details of each analytics provider that is available.
- `DateModified` - The date the analytics have been created or amended
- `Enabled` - Whether the analytics are switched on or not
- `CookieControl` - Defines which cookie control is used, currently only supports Civica

### VersionAnalytic

This table contains the details of which analytics should be used on specific versions..

- `VersionID` - The ID of the [version](../db/versions.md)
- `AnalyticsDefinitionID` - The ID of the analytics definition from the `AnalyticsDefinitions` table

!!! Note on versions
If you don't specify any versions the analytics tool will be applied to all of the versions.

0 comments on commit 6aec47e

Please sign in to comment.