From 6aec47ef183609eb590c18ed62efc1a77bc2cc19 Mon Sep 17 00:00:00 2001 From: Lucy Bishop Date: Tue, 20 Jun 2023 09:59:51 +0100 Subject: [PATCH] Guidance added for adding analytics to specific versions in the database --- docs/db/analytics-definitions.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/db/analytics-definitions.md b/docs/db/analytics-definitions.md index 5548ebb..9f03c2b 100644 --- a/docs/db/analytics-definitions.md +++ b/docs/db/analytics-definitions.md @@ -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 @@ -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. +