Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Commit

Permalink
feat(GA): Implemented and documented google analytic tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed Jun 10, 2016
1 parent 78c48f7 commit 67a989f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
12 changes: 12 additions & 0 deletions docs/guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@ config is merged with the defaults:
}
})

```
### `configureDocs(config)`
Configure the docs options.

config is merged with the defaults:
```javascript
.configureDocs({
meta: { //any attribute listed here is made available to the context of all handlebars templates
gaCode: null, // Google Analytic tracking code. If null the tracking snippet will not be embedded
}
})

```

## Uninstall
Expand Down
6 changes: 4 additions & 2 deletions docs/guide/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ Any file that matches the same name as the toolchain will override the default.
### Variables
The `./package.json` file content is available globally to handlebars templates at `{{pkg}}`

Currently there is no other options to pass in extra variables,
if you'd like this capability, [get in touch](https://github.com/ubiquits/toolchain/issues).
Any additional variables that you would like to add can be defined by [configuring the `meta` object of `configureDocs()` in the `ubiquits.js` file](http://localhost:8080/guide/cli/#-configuredocs-config-)

## TypeDoc
To document your API in it's full detail, [TypeDoc](http://typedoc.io) is used to automatically generate documentation.
Expand All @@ -106,6 +105,9 @@ By default, the documentation will deploy to the `gh-pages` branch at your repos

If you have different requirements, see the [`UbiquitsProject.configureDeployment()`](/guide/cli/#-configuredeployment-config-) section for configuration options.

### Google Analytics
You can add tracking with [Google Analytics](https://analytics.google.com) to your documentation by [configuring the `meta.gaCode` property of `configureDocs()` in the `ubiquits.js` file](http://localhost:8080/guide/cli/#-configuredocs-config-)

### Travis CI
To automate deployment fully, you can use TravisCI to run the deployment process, however you will need to configure
keys so that Travis can push the documentation into the target branch.
Expand Down
8 changes: 7 additions & 1 deletion ubiquits.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const project = new UbiquitsProject(__dirname)
branch: 'master',
repo: '[email protected]:ubiquits/ubiquits.github.io.git'
}
});
})
.configureDocs({
meta: {
gaCode: 'UA-79131526-1'
}
})
;

module.exports = project;

0 comments on commit 67a989f

Please sign in to comment.