Skip to content

Commit

Permalink
Merge pull request #1282 from alphagov/update-readme-with-organisatio…
Browse files Browse the repository at this point in the history
…n-analytics-id

Document how to find an organisation's analytics identifier
  • Loading branch information
tomsabin authored Feb 7, 2018
2 parents ebac7d0 + 7affc29 commit 79e32a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/surveys.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ By default a survey will run on all pages on GOV.UK. If you specify parameters i
* `path` - (optional). If present this is used to match complete path segments in the path of the page. Each entry is turned into a regexp as follows: `statistcis` becomes `/\/statistics(\/|$)/` and this means that a value of "statistics" would match a path like "/government/statistics/a-very-large-report", but not a path like "/guidance/how-to-download-statistics-and-announcements". If you use regex special characters `^` or `$` then the string is not changed before being turned into a regexp to match paths.
* `breadcrumb` - (optional). If present this is used to match against the text in the `.govuk-breadcrumb` element on the page. The text match is case-insensitive and does not attempt to match complete words so `hats` would match `Hats` and `Chats`.
* `section` - (optional). If present this is used to match against the value of the content attribute of the `govuk:section` (old style mainstream navigation hierarchy) and `govuk:themes` (new style taxonomy-based navigation hierarchy) meta tags on the page. The text match is case-insensitive and does not attempt to match complete words so `hats` would match `Hats` and `Chats`. Note that `govuk:section` usually contains `Human Readable` values, whereas `govuk:themes` usually contains `machine-readable` values, but the matcher does not try to normalise these values, so bear that in mind while using this to target a survey.
* `organisation` - (optional). If present this is used to match against the value of the content attribute of the `govuk:analytics:organisations` meta tag on the page. The text match is case-sensitive and does not attempt to match complete words so `hats` would match `hats` and `Chats`, but not `Hats`.
* `tlsCookieVersionLimit` - (optional). If present this is used to compare the TLS version stored in the `TLSVersion` cookie.
* `organisation` - (optional). If present this is used to match against the value of the content attribute of the `govuk:analytics:organisations` meta tag on the page. The text match is case-sensitive and does not attempt to match complete words so `hats` would match `hats` and `Chats`, but not `Hats`. You can find the organisation's analytics identifier using the content store, e.g. for HM Revenue Customs ([api/content/government/organisations/hm-revenue-customs](https://www.gov.uk/api/content/government/organisations/hm-revenue-customs)), the identifier is `D25`. This would typically be represented as `<D25>` in the meta tag.
* `tlsCookieVersionLimit` - (optional). If present this is used to compare the TLS version stored in the `TLSVersion` cookie.

Other than `matchType`, all params are specified as arrays, allowing multiple possible values. All values are OR'd together so that only one of them has to match, not all of them.

Expand Down

0 comments on commit 79e32a6

Please sign in to comment.