Skip to content

Commit

Permalink
Add documentation for addLinkedTrackerDomain method
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwright committed May 1, 2015
1 parent 0718eba commit 262b168
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,15 @@ Pull `print-intent.js` into your project, and initialise it after analytics (see
## Error tracking

Pull `error-tracking.js` into your project, and initialise it after analytics (see [Create an analytics tracker, above](#create-an-analytics-tracker)), to track JavaScript errors.

## Tracking across domains

Once a Tracker instance has been created, tracking across domains can be set up
for pages like:

```js
GOVUK.analytics.addLinkedTrackerDomain(trackerIdHere, nameForTracker, domainToLinkTo);
```

Once this is done hits to that page will be tracked in both your local and the
named tracker, and sessions will persist to the other domain.

0 comments on commit 262b168

Please sign in to comment.